FIX: [STUDIO-1525] not switch preset after cancel edit dialog

Change-Id: I91810298da40250e3c5def72737b2be6df764a3b
This commit is contained in:
chunmao.guo 2022-12-02 10:49:31 +08:00 committed by Lane.Wei
parent 50a5f8bddf
commit 5a6263c9f3
8 changed files with 29 additions and 14 deletions

View file

@ -3728,7 +3728,7 @@ void Tab::update_preset_choice()
// Called by the UI combo box when the user switches profiles, and also to delete the current profile.
// Select a preset by a name.If !defined(name), then the default preset is selected.
// If the current profile is modified, user is asked to save the changes.
void Tab::select_preset(std::string preset_name, bool delete_current /*=false*/, const std::string& last_selected_ph_printer_name/* =""*/, bool force_select)
bool Tab::select_preset(std::string preset_name, bool delete_current /*=false*/, const std::string& last_selected_ph_printer_name/* =""*/, bool force_select)
{
BOOST_LOG_TRIVIAL(info) << boost::format("select preset, name %1%, delete_current %2%")
%preset_name %delete_current;
@ -3956,6 +3956,8 @@ void Tab::select_preset(std::string preset_name, bool delete_current /*=false*/,
if (technology_changed)
wxGetApp().mainframe->technology_changed();
BOOST_LOG_TRIVIAL(info) << boost::format("select preset, exit");
return !canceled;
}
// If the current preset is dirty, the user is asked whether the changes may be discarded.