Revision: 5516
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5516&view=rev
Author:   hofman
Date:     2009-07-26 23:50:48 +0000 (Sun, 26 Jul 2009)

Log Message:
-----------
reset PDF tooltip rects when the pdf view settings change

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

Modified: trunk/SKPDFView.h
===================================================================
--- trunk/SKPDFView.h   2009-07-26 23:41:49 UTC (rev 5515)
+++ trunk/SKPDFView.h   2009-07-26 23:50:48 UTC (rev 5516)
@@ -203,10 +203,6 @@
 - (void)setNeedsDisplayInRect:(NSRect)rect ofPage:(PDFPage *)page;
 - (void)setNeedsDisplayForAnnotation:(PDFAnnotation *)annotation;
 
-- (void)handlePageChangedNotification:(NSNotification *)notification;
-- (void)handleScaleChangedNotification:(NSNotification *)notification;
-- (void)handleWindowWillCloseNotification:(NSNotification *)notification;
-
 - (void)resetPDFToolTipRects;
 - (void)removePDFToolTipRects;
 

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2009-07-26 23:41:49 UTC (rev 5515)
+++ trunk/SKPDFView.m   2009-07-26 23:50:48 UTC (rev 5516)
@@ -128,6 +128,10 @@
 
 @interface PDFView (SKLeopardPrivate)
 - (void)addTooltipsForVisiblePages;
+- (void)handlePageChangedNotification:(NSNotification *)notification;
+- (void)handleScaleChangedNotification:(NSNotification *)notification;
+- (void)handleViewChangedNotification:(NSNotification *)notification;
+- (void)handleWindowWillCloseNotification:(NSNotification *)notification;
 @end
 
 #pragma mark -
@@ -264,6 +268,12 @@
                                                  
name:PDFViewPageChangedNotification object:self];
     [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(handleScaleChangedNotification:) 
                                                  
name:PDFViewScaleChangedNotification object:self];
+    [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(handleViewChangedNotification:) 
+                                                 
name:SKPDFViewDisplayModeChangedNotification object:self];
+    [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(handleViewChangedNotification:) 
+                                                 
name:SKPDFViewDisplayBoxChangedNotification object:self];
+    [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(handleViewChangedNotification:) 
+                                                 
name:SKPDFViewDisplayAsBookChangedNotification object:self];
     [[NSUserDefaultsController sharedUserDefaultsController] addObserver:self 
forKeys:
         [NSArray arrayWithObjects:SKReadingBarColorKey, SKReadingBarInvertKey, 
nil]
         context:&SKPDFViewDefaultsObservationContext];
@@ -2430,6 +2440,7 @@
 }
 
 - (void)handleScaleChangedNotification:(NSNotification *)notification {
+    [self resetPDFToolTipRects];
     if ([self isEditing]) {
         NSRect editBounds = [self convertRect:[self 
convertRect:[activeAnnotation bounds] fromPage:[activeAnnotation page]] 
toView:[self documentView]];
         [editField setFrame:editBounds];
@@ -2440,6 +2451,10 @@
     }
 }
 
+- (void)handleViewChangedNotification:(NSNotification *)notification {
+    [self resetPDFToolTipRects];
+}
+
 #pragma mark Menu validation
 
 - (BOOL)validateMenuItem:(NSMenuItem *)menuItem {


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

------------------------------------------------------------------------------
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to