Prevent wxWidgets assert (KICAD-6VM).

This commit is contained in:
Jeff Young 2025-07-03 22:50:56 -06:00
parent b077b32c43
commit 7b0aceb99e
2 changed files with 5 additions and 2 deletions

View File

@ -864,6 +864,7 @@ void APPEARANCE_CONTROLS_3D::onLayerPresetChanged( wxCommandEvent& aEvent )
if( cfg->m_CurrentPreset == name ) if( cfg->m_CurrentPreset == name )
cfg->m_CurrentPreset = wxEmptyString; cfg->m_CurrentPreset = wxEmptyString;
if( m_presetMRU.Index( name ) >= 0 )
m_presetMRU.Remove( name ); m_presetMRU.Remove( name );
} }

View File

@ -2802,6 +2802,8 @@ void APPEARANCE_CONTROLS::onLayerPresetChanged( wxCommandEvent& aEvent )
preset->flipBoard = m_cbFlipBoard->GetValue(); preset->flipBoard = m_cbFlipBoard->GetValue();
index = m_cbLayerPresets->FindString( name ); index = m_cbLayerPresets->FindString( name );
if( index != wxNOT_FOUND )
m_presetMRU.Remove( name ); m_presetMRU.Remove( name );
} }