Revision: 16780
          http://sourceforge.net/p/skim-app/code/16780
Author:   hofman
Date:     2026-11-02 15:28:10 +0000 (Mon, 02 Nov 2026)
Log Message:
-----------
only need to set pageIndex when different

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

Modified: trunk/SKBookmark.m
===================================================================
--- trunk/SKBookmark.m  2026-11-02 15:23:34 UTC (rev 16779)
+++ trunk/SKBookmark.m  2026-11-02 15:28:10 UTC (rev 16780)
@@ -622,9 +622,10 @@
 - (NSDictionary *)setup {
     if (pageIndex != NSNotFound) {
         NSMutableDictionary *dict = [NSMutableDictionary 
dictionaryWithDictionary:setup];
-        [dict setObject:[NSNumber numberWithUnsignedInteger:pageIndex] 
forKey:PAGEINDEX_KEY];
-        if ([[setup objectForKey:PAGEINDEX_KEY] unsignedIntegerValue] != 
pageIndex)
+        if ([setup objectForKey:PAGEINDEX_KEY] == nil || [[setup 
objectForKey:PAGEINDEX_KEY] unsignedIntegerValue] != pageIndex) {
+            [dict setObject:[NSNumber numberWithUnsignedInteger:pageIndex] 
forKey:PAGEINDEX_KEY];
             [dict removeObjectForKey:SCROLLPOINT_KEY];
+        }
         [dict removeObjectForKey:SKDocumentSetupTabsKey];
         return dict;
     } else if ([setup objectForKey:SKDocumentSetupTabsKey]) {

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