Revision: 3660
http://skim-app.svn.sourceforge.net/skim-app/?rev=3660&view=rev
Author: hofman
Date: 2008-04-06 16:44:21 -0700 (Sun, 06 Apr 2008)
Log Message:
-----------
Avoid change notifications when no change takes place.
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2008-04-06 23:29:25 UTC (rev 3659)
+++ trunk/SKPDFView.m 2008-04-06 23:44:21 UTC (rev 3660)
@@ -531,20 +531,26 @@
}
- (void)setDisplayMode:(PDFDisplayMode)mode {
- [super setDisplayMode:mode];
- [self relayoutEditField];
- [[NSNotificationCenter defaultCenter]
postNotificationName:SKPDFViewDisplayModeChangedNotification object:self
userInfo:nil];
+ if (mode != [self displayBox]) {
+ [super setDisplayMode:mode];
+ [self relayoutEditField];
+ [[NSNotificationCenter defaultCenter]
postNotificationName:SKPDFViewDisplayModeChangedNotification object:self
userInfo:nil];
+ }
}
- (void)setDisplaysAsBook:(BOOL)asBook {
- [super setDisplaysAsBook:asBook];
- [self relayoutEditField];
- [[NSNotificationCenter defaultCenter]
postNotificationName:SKPDFViewDisplayAsBookChangedNotification object:self
userInfo:nil];
+ if (asBook != [self displaysAsBook]) {
+ [super setDisplaysAsBook:asBook];
+ [self relayoutEditField];
+ [[NSNotificationCenter defaultCenter]
postNotificationName:SKPDFViewDisplayAsBookChangedNotification object:self
userInfo:nil];
+ }
}
- (void)setDisplayBox:(PDFDisplayBox)displayBox {
- [super setDisplayBox:displayBox];
- [[NSNotificationCenter defaultCenter]
postNotificationName:SKPDFViewDisplayBoxChangedNotification object:self
userInfo:nil];
+ if (displayBox != [self displayBox]) {
+ [super setDisplayBox:displayBox];
+ [[NSNotificationCenter defaultCenter]
postNotificationName:SKPDFViewDisplayBoxChangedNotification object:self
userInfo:nil];
+ }
}
- (NSRect)currentSelectionRect {
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 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit