Set read-only color swatches on first use
(cherry picked from commit 38054953d1)
This commit is contained in:
@@ -191,20 +191,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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user