Revision: 15037
          http://sourceforge.net/p/skim-app/code/15037
Author:   hofman
Date:     2025-03-28 16:49:05 +0000 (Fri, 28 Mar 2025)
Log Message:
-----------
make sure focusedIndex does not become invalid

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

Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m       2025-03-28 16:43:46 UTC (rev 15036)
+++ trunk/SKColorSwatch.m       2025-03-28 16:49:05 UTC (rev 15037)
@@ -497,6 +497,8 @@
     [self setBezelWidth:[self contentWidth]];
     [self updateItemViewFramesAnimating:NO];
     [[NSNotificationCenter defaultCenter] 
postNotificationName:SKColorSwatchColorsChangedNotification object:self];
+    if (focusedIndex >= (NSInteger)iMax)
+        focusedIndex = iMax - 1;
 }
 
 - (NSColor *)color {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to