Revision: 5706
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5706&view=rev
Author:   hofman
Date:     2009-09-07 22:39:55 +0000 (Mon, 07 Sep 2009)

Log Message:
-----------
Check whether selection for sync is empty rather than nil, very annoying SL 
behavior.

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2009-09-07 22:20:51 UTC (rev 5705)
+++ trunk/SKPDFView.m   2009-09-07 22:39:55 UTC (rev 5706)
@@ -2246,7 +2246,7 @@
     if (pageIndex < [[self document] pageCount]) {
         PDFPage *page = [[self document] pageAtIndex:pageIndex];
         PDFSelection *sel = [page selectionForLineAtPoint:point];
-        NSRect rect = sel ? [sel boundsForPage:page] : 
SKRectFromCenterAndSize(point, SKMakeSquareSize(10.0));
+        NSRect rect = [sel hasCharacters] ? [sel boundsForPage:page] : 
SKRectFromCenterAndSize(point, SKMakeSquareSize(10.0));
         
         if (interactionMode != SKPresentationMode) {
             if (showBar) {
@@ -2258,7 +2258,7 @@
                 [self setNeedsDisplay:YES];
                 [userInfo setObject:page forKey:SKPDFViewNewPageKey];
                 [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFViewReadingBarDidChangeNotification object:self 
userInfo:userInfo];
-            } else if (sel && ([self toolMode] == SKTextToolMode || [self 
toolMode] == SKNoteToolMode)) {
+            } else if ([sel hasCharacters] && ([self toolMode] == 
SKTextToolMode || [self toolMode] == SKNoteToolMode)) {
                 [self setCurrentSelection:sel];
             }
         }


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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to