aboutsummaryrefslogtreecommitdiff
path: root/src/engine_tab/EngineTab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine_tab/EngineTab.cpp')
-rw-r--r--src/engine_tab/EngineTab.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/engine_tab/EngineTab.cpp b/src/engine_tab/EngineTab.cpp
index 91886ee..1f82218 100644
--- a/src/engine_tab/EngineTab.cpp
+++ b/src/engine_tab/EngineTab.cpp
@@ -27,6 +27,7 @@ EngineTab::EngineTab(wxWindow *parent, uciadapter::UCI *engine,
Bind(wxEVT_BUTTON, &EngineTab::OnSave, this, ENGINE_SAVE_CONF_BUTTON);
Bind(wxEVT_BUTTON, &EngineTab::OnDelete, this, ENGINE_DELETE_CONF_BUTTON);
+ Bind(wxEVT_PG_CHANGED, [p=this](wxPropertyGridEvent& event){p->is_dirty=true;});
}
EngineTab::EngineTab(wxWindow *parent, std::string name)
@@ -107,6 +108,12 @@ void EngineTab::OnSave(wxCommandEvent &event) {
engineName = new_engine_name;
confGroup = "engines/" + engineName;
conf2->SetPath("..");
+ SetLabel(new_engine_name);
+ // First refresh tab title
+ wxCommandEvent refreshTitle(REFRESH_TAB_TITLE, GetId());
+ refreshTitle.SetEventObject(this);
+ wxLogDebug("New engine name is %s",this->GetLabel());
+ ProcessEvent(refreshTitle);
}
long index;
std::string optsPath = confGroup + "/options";
@@ -128,6 +135,7 @@ void EngineTab::OnSave(wxCommandEvent &event) {
} while (conf2->GetNextGroup(opt_name, index));
}
CONFIG_CLOSE(conf2);
+ // Notify all other tabs about this new configuration
RefreshItemList();
}