mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-02 00:26:45 +00:00
Set read-only color swatches on first use
This commit is contained in:
parent
b7592db2b3
commit
38054953d1
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user