Revision: 16274
          http://sourceforge.net/p/skim-app/code/16274
Author:   hofman
Date:     2026-05-10 16:41:20 +0000 (Sun, 10 May 2026)
Log Message:
-----------
only update color panel when window is main

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

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2026-05-10 16:33:21 UTC (rev 16273)
+++ trunk/SKMainWindowController_UI.m   2026-05-10 16:41:20 UTC (rev 16274)
@@ -157,11 +157,11 @@
 }
 
 - (void)updateColorPanel {
-    PDFAnnotation *annotation = [pdfView currentAnnotation];
-    NSColor *color = nil;
-    NSView *accessoryView = nil;
-    
     if ([[self window] isMainWindow]) {
+        PDFAnnotation *annotation = [pdfView currentAnnotation];
+        NSColor *color = nil;
+        NSView *accessoryView = nil;
+        
         if ([annotation isSkimNote]) {
             if ([annotation hasInteriorColor]) {
                 if (colorAccessoryView == nil)
@@ -184,13 +184,13 @@
             [[NSColorPanel sharedColorPanel] setAccessoryView:nil];
             [[NSColorPanel sharedColorPanel] setAccessoryView:accessoryView];
         }
+        
+        if (color) {
+            mwcFlags.updatingColor = 1;
+            [[NSColorPanel sharedColorPanel] setColor:color];
+            mwcFlags.updatingColor = 0;
+        }
     }
-    
-    if (color) {
-        mwcFlags.updatingColor = 1;
-        [[NSColorPanel sharedColorPanel] setColor:color];
-        mwcFlags.updatingColor = 0;
-    }
 }
 
 - (void)changeColorProperty:(id)sender{
@@ -200,7 +200,7 @@
 - (void)updateLineInspector {
     PDFAnnotation *annotation = [pdfView currentAnnotation];
     
-    if ([[self window] isMainWindow] &&[annotation hasBorder]) {
+    if ([[self window] isMainWindow] && [annotation hasBorder]) {
         mwcFlags.updatingLine = 1;
         [[SKLineInspector sharedLineInspector] setAnnotationStyle:annotation];
         mwcFlags.updatingLine = 0;

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