Call _on_select_preset from _on_change_combobox

This commit is contained in:
Joseph Lenox 2018-11-18 00:43:38 -06:00 committed by Joseph Lenox
parent fd1a204538
commit 4d23ea916e

View File

@ -88,9 +88,11 @@ void PresetChooser::_on_change_combobox(preset_t preset, wxBitmapComboBox* choic
// Prompt for unsaved changes and undo selections if cancelled and return early // Prompt for unsaved changes and undo selections if cancelled and return early
// Callback to close preset editor tab, close editor tabs, reload presets. // Callback to close preset editor tab, close editor tabs, reload presets.
wxTheApp->CallAfter([this](){ //
if (!this->prompt_unsaved_changes()) return;
// this->_on_select_preset(preset); wxTheApp->CallAfter([this,preset]()
{
this->_on_select_preset(preset);
// reload presets; removes the modified mark // reload presets; removes the modified mark
this->load(); this->load();
}); });