Permalink
Browse files

Don't set up cursor rects when we don't have a tool. That way other v…

…iews behind/around us can provide one.
  • Loading branch information...
1 parent 6efcef3 commit d46fa02e7a70299f0ef58c8ad2edd8df692a3212 @uliwitness committed May 18, 2011
Showing with 9 additions and 4 deletions.
  1. +9 −4 ULIPaintView.m
View
@@ -690,10 +690,15 @@ -(void) paintToolWillChange: (id)sender
-(void) resetCursorRects
{
- // +++ FIXME: Should really set selection cursor based on selectionPath, not just selectionFrame.
- [self addCursorRect:[self bounds] cursor: [currentTool drawingCursor]];
- if( selectionFrame.size.height != 0 && selectionFrame.size.width != 0 )
- [self addCursorRect: selectionFrame cursor: [currentTool selectionCursor]];
+ [super resetCursorRects];
+
+ if( currentTool )
+ {
+ // +++ FIXME: Should really set selection cursor based on selectionPath, not just selectionFrame.
+ [self addCursorRect:[self bounds] cursor: [currentTool drawingCursor]];
+ if( selectionFrame.size.height != 0 && selectionFrame.size.width != 0 )
+ [self addCursorRect: selectionFrame cursor: [currentTool selectionCursor]];
+ }
}

0 comments on commit d46fa02

Please sign in to comment.