Revision: 6986
http://skim-app.svn.sourceforge.net/skim-app/?rev=6986&view=rev
Author: hofman
Date: 2010-12-17 22:03:06 +0000 (Fri, 17 Dec 2010)
Log Message:
-----------
reorganize some mouseDown code, eat up mouse events when we do nothing
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2010-12-17 12:55:25 UTC (rev 6985)
+++ trunk/SKPDFView.m 2010-12-17 22:03:06 UTC (rev 6986)
@@ -1082,20 +1082,21 @@
switch (toolMode) {
case SKTextToolMode:
case SKNoteToolMode:
- if ([self doSelectAnnotationWithEvent:theEvent
hitAnnotation:&hitAnnotation] == NO &&
- (toolMode == SKTextToolMode || hideNotes ||
ANNOTATION_MODE_IS_MARKUP)) {
+ if ([self doSelectAnnotationWithEvent:theEvent
hitAnnotation:&hitAnnotation] == NO) {
if (area == kPDFPageArea && [theEvent
standardModifierFlags] == 0 && [[page selectionForRect:NSMakeRect(p.x - 40.0,
p.y - 50.0, 80.0, 100.0)] hasCharacters] == NO) {
[self doDragWithEvent:theEvent];
- } else {
- // [super mouseDown:] since 10.5 runs a
mouse-tracking loop
- if (nil == activeAnnotation && hitAnnotation)
+ } else if (toolMode == SKTextToolMode || hideNotes ||
ANNOTATION_MODE_IS_MARKUP) {
+ // before 10.6 PDFView did not select behind an
annotation
+ if (hitAnnotation && floor(NSAppKitVersionNumber)
<= NSAppKitVersionNumber10_5)
[self doSelectTextWithEvent:theEvent];
- else
+ else // [super mouseDown:] since 10.5 runs a
mouse-tracking loop,
[super mouseDown:theEvent];
if (toolMode == SKNoteToolMode && hideNotes == NO
&& ANNOTATION_MODE_IS_MARKUP && [[self currentSelection] hasCharacters]) {
[self addAnnotationWithType:annotationMode];
[self setCurrentSelection:nil];
}
+ } else {
+ [self doNothingWithEvent:theEvent];
}
}
break;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit