Now engine list in game tab is updated properly

This commit is contained in:
Loic Guegan 2022-02-26 21:59:41 +01:00
parent 6c34ef20fb
commit 711fce41c7
4 changed files with 21 additions and 13 deletions

View file

@ -44,8 +44,6 @@ MainWindow::MainWindow()
engineMenu->Append(6, "New", "Create a new engine configuration");
manageMenu = new wxMenu;
engineMenu->AppendSubMenu(manageMenu, "Manage");
wxCommandEvent dummy(REFRESH_ENGINE_LIST, GetId());
OnRefreshEngineList(dummy);
/// Menu bar
menuBar = new wxMenuBar;
@ -78,6 +76,8 @@ MainWindow::MainWindow()
"/home/loic/.local/bin/stockfish");
notebook->AddPage(bt, bt->GetLabel());
notebook->SetSelection(notebook->GetPageIndex(bt));*/
wxCommandEvent dummy(REFRESH_ENGINE_LIST, GetId());
OnRefreshEngineList(dummy);
}
void MainWindow::OnCloseTabEvent(wxCommandEvent &event) {
@ -131,8 +131,8 @@ void MainWindow::OnRefreshEngineList(wxCommandEvent &event) {
id++;
} while (conf->GetNextGroup(engine_name, index));
}
CONFIG_CLOSE(conf);
ApplyPreferences(); // Propagate motifications
}
void MainWindow::NewEngine() {