Revision: 7522
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7522&view=rev
Author:   hofman
Date:     2011-10-24 17:11:05 +0000 (Mon, 24 Oct 2011)
Log Message:
-----------
local variable for modifier flags

Modified Paths:
--------------
    trunk/SKPDFView.m

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2011-10-20 22:12:24 UTC (rev 7521)
+++ trunk/SKPDFView.m   2011-10-24 17:11:05 UTC (rev 7522)
@@ -3295,8 +3295,8 @@
     }
     
     if (hideNotes == NO && page != nil) {
-        BOOL isShift = 0 != ([theEvent modifierFlags] & NSShiftKeyMask);
-        if (([theEvent modifierFlags] & NSAlternateKeyMask) && 
[newActiveAnnotation isMovable]) {
+        NSUInteger modifiers = [theEvent modifierFlags];
+        if ((modifiers & NSAlternateKeyMask) && [newActiveAnnotation 
isMovable]) {
             // select a new copy of the annotation
             PDFAnnotation *newAnnotation = [[PDFAnnotation alloc] 
initSkimNoteWithProperties:[newActiveAnnotation SkimNoteProperties]];
             [newAnnotation registerUserName];
@@ -3316,12 +3316,12 @@
                 mouseDownInAnnotation = YES;
             }
         } else if (([newActiveAnnotation isMarkup] || 
-                    (isInk && newActiveAnnotation && (newActiveAnnotation != 
activeAnnotation || ([theEvent modifierFlags] & (NSShiftKeyMask | 
NSAlphaShiftKeyMask))))) && 
+                    (isInk && newActiveAnnotation && (newActiveAnnotation != 
activeAnnotation || (modifiers & (NSShiftKeyMask | NSAlphaShiftKeyMask))))) && 
                    NSLeftMouseDragged == [[NSApp 
nextEventMatchingMask:(NSLeftMouseUpMask | NSLeftMouseDraggedMask) 
untilDate:[NSDate distantFuture] inMode:NSEventTrackingRunLoopMode dequeue:NO] 
type]) {
             // don't drag markup notes or in freehand tool mode, unless the 
note was previously selected, so we can select text or draw freehand strokes
             newActiveAnnotation = nil;
             mouseDownInAnnotation = YES;
-        } else if (isShift && activeAnnotation != newActiveAnnotation && 
[[activeAnnotation page] isEqual:[newActiveAnnotation page]] && 
[[activeAnnotation type] isEqualToString:[newActiveAnnotation type]]) {
+        } else if ((modifiers & NSShiftKeyMask) && activeAnnotation != 
newActiveAnnotation && [[activeAnnotation page] isEqual:[newActiveAnnotation 
page]] && [[activeAnnotation type] isEqualToString:[newActiveAnnotation type]]) 
{
             if ([activeAnnotation isMarkup]) {
                 NSInteger markupType = [(PDFAnnotationMarkup 
*)activeAnnotation markupType];
                 PDFSelection *sel = [(PDFAnnotationMarkup *)activeAnnotation 
selection];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to