Revision: 2616 http://skim-app.svn.sourceforge.net/skim-app/?rev=2616&view=rev Author: hofman Date: 2007-08-07 02:07:29 -0700 (Tue, 07 Aug 2007)
Log Message: ----------- Don't override mouse events when the document is locked. Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-08-06 16:43:36 UTC (rev 2615) +++ trunk/SKPDFView.m 2007-08-07 09:07:29 UTC (rev 2616) @@ -907,7 +907,10 @@ mouseDownLoc = [theEvent locationInWindow]; unsigned int modifiers = [theEvent modifierFlags] & NSDeviceIndependentModifierFlagsMask; - if (hasNavigation && autohidesCursor) { + if ([[self document] isLocked]) { + [super mouseDown:theEvent]; + return; + } else if (hasNavigation && autohidesCursor) { if ([self areaOfInterestForMouse:theEvent] & kPDFLinkArea) { [super mouseDown:theEvent]; } else { @@ -973,6 +976,11 @@ } - (void)mouseUp:(NSEvent *)theEvent{ + if ([[self document] isLocked]) { + [super mouseUp:theEvent]; + return; + } + switch (toolMode) { case SKTextToolMode: case SKNoteToolMode: @@ -1024,6 +1032,11 @@ } - (void)mouseDragged:(NSEvent *)theEvent { + if ([[self document] isLocked]) { + [super mouseDragged:theEvent]; + return; + } + switch (toolMode) { case SKTextToolMode: case SKNoteToolMode: @@ -1053,7 +1066,6 @@ } - (void)mouseMoved:(NSEvent *)theEvent { - NSCursor *cursor = [self cursorForEvent:theEvent]; if (cursor) [cursor set]; @@ -3430,7 +3442,8 @@ NSPoint p = [self convertPoint:[theEvent locationInWindow] fromView:nil]; NSCursor *cursor = nil; - if (hasNavigation && autohidesCursor) { + if ([[self document] isLocked]) { + } else if (hasNavigation && autohidesCursor) { if ([self areaOfInterestForMouse:theEvent] & kPDFLinkArea) cursor = [NSCursor pointingHandCursor]; else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit