From 38054953d117dfb2bd47075a26fd5ebf5e605929 Mon Sep 17 00:00:00 2001
From: JamesJCode <13408010-JamesJCode@users.noreply.gitlab.com>
Date: Fri, 24 Jan 2025 01:10:43 +0000
Subject: [PATCH] Set read-only color swatches on first use

---
 common/dialogs/panel_color_settings.cpp | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/common/dialogs/panel_color_settings.cpp b/common/dialogs/panel_color_settings.cpp
index dfe8dd0910..a0c0f29c66 100644
--- a/common/dialogs/panel_color_settings.cpp
+++ b/common/dialogs/panel_color_settings.cpp
@@ -193,20 +193,16 @@ void PANEL_COLOR_SETTINGS::OnThemeChanged( wxCommandEvent& event )
 void PANEL_COLOR_SETTINGS::updateSwatches()
 {
     if( m_swatches.empty() )
-    {
         createSwatches();
-    }
-    else
-    {
-        bool    isReadOnly = m_currentSettings->IsReadOnly();
-        COLOR4D background = m_currentSettings->GetColor( m_backgroundLayer );
 
-        for( std::pair<int, COLOR_SWATCH*> pair : m_swatches )
-        {
-            pair.second->SetSwatchBackground( background );
-            pair.second->SetSwatchColor( m_currentSettings->GetColor( pair.first ), false );
-            pair.second->SetReadOnly( isReadOnly );
-        }
+    bool    isReadOnly = m_currentSettings->IsReadOnly();
+    COLOR4D background = m_currentSettings->GetColor( m_backgroundLayer );
+
+    for( std::pair<int, COLOR_SWATCH*> pair : m_swatches )
+    {
+        pair.second->SetSwatchBackground( background );
+        pair.second->SetSwatchColor( m_currentSettings->GetColor( pair.first ), false );
+        pair.second->SetReadOnly( isReadOnly );
     }
 }