From e0fdfbe1d5ed34ba7b16bea54bf0655f827dbd1e Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sun, 21 Mar 2021 21:03:01 -0400 Subject: [PATCH] createThemeList takes a filename, not a name Fixes https://gitlab.com/kicad/code/kicad/-/issues/7075 --- common/dialogs/panel_color_settings.cpp | 3 +-- include/dialogs/panel_color_settings.h | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/dialogs/panel_color_settings.cpp b/common/dialogs/panel_color_settings.cpp index 375fbd6ef7..dedb9f953a 100644 --- a/common/dialogs/panel_color_settings.cpp +++ b/common/dialogs/panel_color_settings.cpp @@ -101,8 +101,7 @@ bool PANEL_COLOR_SETTINGS::Show( bool show ) void PANEL_COLOR_SETTINGS::OnLeftDownTheme( wxMouseEvent& event ) { // Lazy rebuild of theme menu to catch any colour theme changes made in other panels - wxString sel = m_cbTheme->GetStringSelection(); - createThemeList( sel ); + createThemeList( m_currentSettings->GetFilename() ); event.Skip(); } diff --git a/include/dialogs/panel_color_settings.h b/include/dialogs/panel_color_settings.h index cdfdc3263d..24a4a117c9 100644 --- a/include/dialogs/panel_color_settings.h +++ b/include/dialogs/panel_color_settings.h @@ -64,6 +64,10 @@ protected: void updateSwatches(); + /** + * Builds the theme listbox and sets the selection to the current theme + * @param aCurrent is the filename of the current color theme (no extension) + */ void createThemeList( const wxString& aCurrent ); void createSwatch( int aLayer, const wxString& aName );