Revision: 3950
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3950&view=rev
Author:   hofman
Date:     2008-06-01 08:33:44 -0700 (Sun, 01 Jun 2008)

Log Message:
-----------
Hide temporary annotations in thumbnails.

Modified Paths:
--------------
    trunk/PDFPage_SKExtensions.m
    trunk/SKPDFAnnotationTemporary.h
    trunk/SKPDFAnnotationTemporary.m

Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m        2008-06-01 14:18:07 UTC (rev 3949)
+++ trunk/PDFPage_SKExtensions.m        2008-06-01 15:33:44 UTC (rev 3950)
@@ -38,6 +38,7 @@
 
 #import "PDFPage_SKExtensions.h"
 #import "PDFAnnotation_SKExtensions.h"
+#import "SKPDFAnnotationTemporary.h"
 #import "SKPDFDocument.h"
 #import "SKPDFView.h"
 #import "PDFSelection_SKExtensions.h"
@@ -197,8 +198,11 @@
         [transform translateXBy:(shadowBlurRadius - shadowOffset.width) / 
scale yBy:(shadowBlurRadius - shadowOffset.height) / scale];
         [transform concat];
     }
-
+    
+    [[self annotations] makeObjectsPerformSelector:@selector(hideIfTemporary)];
     [self drawWithBox:box]; 
+    [[self annotations] 
makeObjectsPerformSelector:@selector(displayIfTemporary)];
+    
     if (NSIsEmptyRect(readingBarRect) == NO) {
         [[NSUnarchiver unarchiveObjectWithData:[[NSUserDefaults 
standardUserDefaults] objectForKey:SKReadingBarColorKey]] setFill];
         if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKReadingBarInvertKey]) {

Modified: trunk/SKPDFAnnotationTemporary.h
===================================================================
--- trunk/SKPDFAnnotationTemporary.h    2008-06-01 14:18:07 UTC (rev 3949)
+++ trunk/SKPDFAnnotationTemporary.h    2008-06-01 15:33:44 UTC (rev 3950)
@@ -45,4 +45,6 @@
 
 @interface PDFAnnotation (SKPDFAnnotationTemporary)
 - (BOOL)isTemporaryAnnotation;
+- (void)hideIfTemporary;
+- (void)displayIfTemporary;
 @end

Modified: trunk/SKPDFAnnotationTemporary.m
===================================================================
--- trunk/SKPDFAnnotationTemporary.m    2008-06-01 14:18:07 UTC (rev 3949)
+++ trunk/SKPDFAnnotationTemporary.m    2008-06-01 15:33:44 UTC (rev 3950)
@@ -43,8 +43,12 @@
 @implementation SKPDFAnnotationTemporary
 - (BOOL)isTemporaryAnnotation { return YES; }
 - (BOOL)shouldPrint { return NO; }
+- (void)hideIfTemporary { [self setShouldDisplay:NO]; }
+- (void)displayIfTemporary { [self setShouldDisplay:YES]; }
 @end
 
 @implementation PDFAnnotation (SKPDFAnnotationTemporary)
 - (BOOL)isTemporaryAnnotation { return NO; }
+- (void)hideIfTemporary {}
+- (void)displayIfTemporary {}
 @end


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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to