Revision: 15894
          http://sourceforge.net/p/skim-app/code/15894
Author:   hofman
Date:     2025-12-20 17:21:18 +0000 (Sat, 20 Dec 2025)
Log Message:
-----------
no need to check observed key

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2025-12-20 17:19:42 UTC (rev 15893)
+++ trunk/SKPDFView.m   2025-12-20 17:21:18 UTC (rev 15894)
@@ -3348,13 +3348,11 @@
 
 - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object 
change:(NSDictionary *)change context:(void *)context {
     if (context == &SKPDFViewDefaultsObservationContext) {
-        if ([keyPath isEqualToString:SKReadingBarColorKey] || [keyPath 
isEqualToString:SKReadingBarInvertKey]) {
-            if (readingBar) {
-                PDFPage *page = [readingBar page];
-                [self setNeedsDisplay:([keyPath 
isEqualToString:SKReadingBarInvertKey] || [[NSUserDefaults 
standardUserDefaults] boolForKey:SKReadingBarInvertKey]) 
forReadingBarBounds:[readingBar currentBounds] onPage:page];
-                [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFViewReadingBarDidChangeNotification
-                    object:self userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:page, SKPDFViewOldPageKey, page, 
SKPDFViewNewPageKey, nil]];
-            }
+        if (readingBar) {
+            PDFPage *page = [readingBar page];
+            [self setNeedsDisplay:([keyPath 
isEqualToString:SKReadingBarInvertKey] || [[NSUserDefaults 
standardUserDefaults] boolForKey:SKReadingBarInvertKey]) 
forReadingBarBounds:[readingBar currentBounds] onPage:page];
+            [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFViewReadingBarDidChangeNotification
+                object:self userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:page, SKPDFViewOldPageKey, page, 
SKPDFViewNewPageKey, nil]];
         }
     } else {
         [super observeValueForKeyPath:keyPath ofObject:object change:change 
context:context];

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