Revision: 15057 http://sourceforge.net/p/skim-app/code/15057 Author: hofman Date: 2025-03-30 14:59:44 +0000 (Sun, 30 Mar 2025) Log Message: ----------- fix checks
Modified Paths: -------------- trunk/SKColorSwatch.m Modified: trunk/SKColorSwatch.m =================================================================== --- trunk/SKColorSwatch.m 2025-03-30 14:39:44 UTC (rev 15056) +++ trunk/SKColorSwatch.m 2025-03-30 14:59:44 UTC (rev 15057) @@ -602,7 +602,7 @@ - (void)setColor:(NSColor *)color atIndex:(NSInteger)i { [self _setColor:color atIndex:i]; - if (VALID_INDEX(i, <=) && selectedIndex == i) { + if (VALID_INDEX(i, <) && selectedIndex == i) { NSColorPanel *colorPanel = [NSColorPanel sharedColorPanel]; NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc removeObserver:self name:NSColorPanelColorDidChangeNotification object:colorPanel]; @@ -612,7 +612,7 @@ } - (void)insertColor:(NSColor *)color atIndex:(NSInteger)i { - if (VALID_INDEX(i, <)) { + if (VALID_INDEX(i, <=)) { [self willChangeColors]; bezelWidth = [self contentWidth]; SKColorSwatchItemView *itemView = [[SKColorSwatchItemView alloc] initWithFrame:[self frameForCollapsedItemViewAtIndex:i]]; 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