Use the saved config values or application values.

ConfigEditorPopup

On creating the popup, config values were always read and used. Do this if the
application does not provide its own variables. The values are still committed
to the config file in the usual way (on control destruction). The application
may restore them to its own variables during setup.
This commit is contained in:
Saleem Edah-Tally
2025-07-13 16:10:15 +02:00
parent 059b16f08a
commit 7d3c61c91d
4 changed files with 48 additions and 22 deletions

View File

@@ -27,9 +27,9 @@ public:
virtual ~ConfigEditorPopup();
PopupTransientWindow* CreatePopup();
void ShowPopup();
wxCheckBox* AddCheckBox ( const wxString& label, const wxString& configPath );
wxSpinCtrl* AddSpinCtrl ( const wxString& label, const wxString& configPath );
wxTextCtrl * AddTextCtrl ( const wxString& label, const wxString& configPath );
wxCheckBox* AddCheckBox(const wxString& label, const wxString& configPath, bool * clientVar = nullptr);
wxSpinCtrl* AddSpinCtrl ( const wxString& label, const wxString& configPath, int * clientVar = nullptr );
wxTextCtrl * AddTextCtrl ( const wxString& label, const wxString& configPath, wxString * clientVar = nullptr );
private:
wxConfig * m_config = nullptr;