Revision: 4786
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4786&view=rev
Author:   hofman
Date:     2008-10-13 16:52:42 +0000 (Mon, 13 Oct 2008)

Log Message:
-----------
Update layout when printinfo changes in superclass of printableView.

Modified Paths:
--------------
    trunk/BDSKPrintableView.m
    trunk/MultiplePageView.h
    trunk/MultiplePageView.m

Modified: trunk/BDSKPrintableView.m
===================================================================
--- trunk/BDSKPrintableView.m   2008-10-13 15:08:08 UTC (rev 4785)
+++ trunk/BDSKPrintableView.m   2008-10-13 16:52:42 UTC (rev 4786)
@@ -103,6 +103,8 @@
 }
 
 - (void)printInfoUpdated {
+    [super printInfoUpdated];
+    
     unsigned cnt, numberOfPages = [self numberOfPages];
     NSArray *textContainers = [[self layoutManager] textContainers];
     
@@ -116,11 +118,6 @@
     }
 }
 
-- (void)setPrintInfo:(NSPrintInfo *)info {
-    [super setPrintInfo:info];
-    [self printInfoUpdated];
-}
-
 - (void)addPage {
     NSZone *zone = [self zone];
     unsigned numberOfPages = [self numberOfPages];
@@ -239,7 +236,6 @@
     margins.top = width;
     margins.bottom = width;
     [self printInfoUpdated];
-    [self setNeedsDisplay:YES];
 }
 
 - (NSSize)documentSizeInPage {

Modified: trunk/MultiplePageView.h
===================================================================
--- trunk/MultiplePageView.h    2008-10-13 15:08:08 UTC (rev 4785)
+++ trunk/MultiplePageView.h    2008-10-13 16:52:42 UTC (rev 4786)
@@ -49,6 +49,7 @@
 
 - (void)setPrintInfo:(NSPrintInfo *)anObject;
 - (NSPrintInfo *)printInfo;
+- (void)printInfoUpdated;
 - (float)pageSeparatorHeight;
 - (NSSize)documentSizeInPage;  /* Returns the area where the document can draw 
*/
 - (NSRect)documentRectForPageNumber:(unsigned)pageNumber;      /* First page 
is page 0 */

Modified: trunk/MultiplePageView.m
===================================================================
--- trunk/MultiplePageView.m    2008-10-13 15:08:08 UTC (rev 4785)
+++ trunk/MultiplePageView.m    2008-10-13 16:52:42 UTC (rev 4786)
@@ -83,12 +83,16 @@
     }
 }
 
+- (void)printInfoUpdated {
+    [self updateFrame];
+    [self setNeedsDisplay:YES];        /* Because the page size or margins 
might change (could optimize this) */
+}
+
 - (void)setPrintInfo:(NSPrintInfo *)anObject {
     if (printInfo != anObject) {
         [printInfo autorelease];
         printInfo = [anObject copyWithZone:[self zone]];
-        [self updateFrame];
-        [self setNeedsDisplay:YES];    /* Because the page size or margins 
might change (could optimize this) */
+        [self printInfoUpdated];
     }
 }
 


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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to