Revision: 16277
http://sourceforge.net/p/skim-app/code/16277
Author: hofman
Date: 2026-05-10 17:06:59 +0000 (Sun, 10 May 2026)
Log Message:
-----------
only call utility panel updates when selecting a skim notee
Modified Paths:
--------------
trunk/SKMainWindowController_UI.m
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2026-05-10 16:56:22 UTC (rev 16276)
+++ trunk/SKMainWindowController_UI.m 2026-05-10 17:06:59 UTC (rev 16277)
@@ -161,29 +161,28 @@
NSColor *color = nil;
NSView *accessoryView = nil;
- if ([annotation isSkimNote]) {
- if ([annotation hasInteriorColor]) {
- if (colorAccessoryView == nil)
- colorAccessoryView = [self
newColorAccessoryButtonWithTitle:NSLocalizedString(@"Fill color", @"Check
button title")];
- accessoryView = colorAccessoryView;
- } else if ([annotation isText]) {
- if (textColorAccessoryView == nil)
- textColorAccessoryView = [self
newColorAccessoryButtonWithTitle:NSLocalizedString(@"Text color", @"Check
button title")];
- accessoryView = textColorAccessoryView;
- }
- if ([annotation hasInteriorColor] && [colorAccessoryView state] ==
NSControlStateValueOn) {
- color = [(id)annotation interiorColor] ?: [NSColor clearColor];
- } else if ([annotation isText] && [textColorAccessoryView state] ==
NSControlStateValueOn) {
- color = [(id)annotation fontColor] ?: [NSColor blackColor];
- } else {
- color = [annotation color];
- }
- if (color) {
- mwcFlags.updatingColor = 1;
- [[NSColorPanel sharedColorPanel] setColor:color];
- mwcFlags.updatingColor = 0;
- }
+ if ([annotation hasInteriorColor]) {
+ if (colorAccessoryView == nil)
+ colorAccessoryView = [self
newColorAccessoryButtonWithTitle:NSLocalizedString(@"Fill color", @"Check
button title")];
+ accessoryView = colorAccessoryView;
+ } else if ([annotation isText]) {
+ if (textColorAccessoryView == nil)
+ textColorAccessoryView = [self
newColorAccessoryButtonWithTitle:NSLocalizedString(@"Text color", @"Check
button title")];
+ accessoryView = textColorAccessoryView;
}
+ if ([annotation hasInteriorColor] && [colorAccessoryView state] ==
NSControlStateValueOn) {
+ color = [(id)annotation interiorColor] ?: [NSColor clearColor];
+ } else if ([annotation isText] && [textColorAccessoryView state] ==
NSControlStateValueOn) {
+ color = [(id)annotation fontColor] ?: [NSColor blackColor];
+ } else {
+ color = [annotation color];
+ }
+ if (color) {
+ mwcFlags.updatingColor = 1;
+ [[NSColorPanel sharedColorPanel] setColor:color];
+ mwcFlags.updatingColor = 0;
+ }
+
if ([[NSColorPanel sharedColorPanel] accessoryView] != accessoryView) {
[[NSColorPanel sharedColorPanel] setAccessoryView:nil];
[[NSColorPanel sharedColorPanel] setAccessoryView:accessoryView];
@@ -216,10 +215,13 @@
[[NSFontManager sharedFontManager]
setSelectedAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[annotation
fontColor], NSForegroundColorAttributeName, nil] isMultiple:NO];
mwcFlags.updatingFontAttributes = 0;
}
+
+ [self updateColorPanel];
+ [self updateLineInspector];
+
+ } else if ([[NSColorPanel sharedColorPanel] accessoryView]) {
+ [[NSColorPanel sharedColorPanel] setAccessoryView:nil];
}
-
- [self updateColorPanel];
- [self updateLineInspector];
}
}
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