Revision: 3667
http://skim-app.svn.sourceforge.net/skim-app/?rev=3667&view=rev
Author: hofman
Date: 2008-04-07 10:03:09 -0700 (Mon, 07 Apr 2008)
Log Message:
-----------
Remove hidden pref for selecting behind a note. Instead allow selecting behind
markup when dragging AOT clicking.
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2008-04-07 16:37:23 UTC (rev 3666)
+++ trunk/SKPDFView.m 2008-04-07 17:03:09 UTC (rev 3667)
@@ -91,7 +91,6 @@
static NSString *SKMoveReadingBarModifiersKey = @"SKMoveReadingBarModifiers";
static NSString *SKResizeReadingBarModifiersKey =
@"SKResizeReadingBarModifiers";
static NSString *SKDisableUpdateContentsFromEnclosedTextKey =
@"SKDisableUpdateContentsFromEnclosedText";
-static NSString *SKSelectTextBehindNotesOnCapsLockKey =
@"SKSelectTextBehindNotesOnCapsLock";
static unsigned int moveReadingBarModifiers = NSAlternateKeyMask;
static unsigned int resizeReadingBarModifiers = NSAlternateKeyMask |
NSShiftKeyMask;
@@ -2709,7 +2708,6 @@
int i;
NSPoint pagePoint;
PDFPage *page;
- BOOL canSelectNotes = [[NSUserDefaults standardUserDefaults]
boolForKey:SKSelectTextBehindNotesOnCapsLockKey] == NO || ([theEvent
modifierFlags] & NSAlphaShiftKeyMask) == 0;
// Mouse in display view coordinates.
mouseDownLoc = [theEvent locationInWindow];
@@ -2732,7 +2730,7 @@
// Hit test annotation.
if ([annotation isNoteAnnotation]) {
- if ([annotation hitTest:pagePoint] && (editField == nil ||
annotation != activeAnnotation) && canSelectNotes) {
+ if ([annotation hitTest:pagePoint] && (editField == nil ||
annotation != activeAnnotation)) {
mouseDownInAnnotation = YES;
newActiveAnnotation = annotation;
// Remember click point relative to annotation origin.
@@ -2776,6 +2774,9 @@
clickDelta.x = pagePoint.x - NSMinX(bounds);
clickDelta.y = pagePoint.y - NSMinY(bounds);
}
+ } else if ([newActiveAnnotation isMarkupAnnotation] &&
NSLeftMouseDragged == [[NSApp nextEventMatchingMask:(NSLeftMouseUpMask |
NSLeftMouseDraggedMask) untilDate:[NSDate distantFuture]
inMode:NSDefaultRunLoopMode dequeue:NO] type]) {
+ newActiveAnnotation = nil;
+ mouseDownInAnnotation = YES;
} else if (([theEvent modifierFlags] & NSShiftKeyMask) &&
[activeAnnotation isEqual:newActiveAnnotation] == NO && [[activeAnnotation
page] isEqual:[newActiveAnnotation page]] && [[activeAnnotation type]
isEqualToString:[newActiveAnnotation type]] && [activeAnnotation
isMarkupAnnotation]) {
int markupType = [(SKPDFAnnotationMarkup *)activeAnnotation
markupType];
PDFSelection *sel = [(SKPDFAnnotationMarkup *)activeAnnotation
selection];
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 the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit