Revision: 3997
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3997&view=rev
Author:   hofman
Date:     2008-06-10 17:09:18 -0700 (Tue, 10 Jun 2008)

Log Message:
-----------
Get center of current page as last resort to add note

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2008-06-10 17:50:48 UTC (rev 3996)
+++ trunk/SKPDFView.m   2008-06-11 00:09:18 UTC (rev 3997)
@@ -1829,6 +1829,11 @@
             NSRect viewFrame = [self frame];
             center = SKCenterPoint(viewFrame);
             page = [self pageForPoint: center nearest: YES];
+            if (page == nil) {
+                // Get center of the current page
+                page = [self currentPage];
+                center = [sef convertPoint:SKCenterPoint([page bounds]) 
fromPage:page];
+            }
         }
         
         float defaultWidth = [[NSUserDefaults standardUserDefaults] 
floatForKey:SKDefaultNoteWidthKey];


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

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to