From 1618113e61cce568e1efb091a8a600345fcf84ed Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Tue, 31 Jan 2023 10:26:40 +0100 Subject: Debug engine configuration --- src/MainWindow.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/MainWindow.cpp') diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 21e0a92..27eda12 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -122,7 +122,7 @@ void MainWindow::OnMenuItemClick(wxCommandEvent &event) { if (item->GetId() == id) { wxLogDebug("Selected %s", item->GetItemLabel()); EngineTab *et = new EngineTab((wxWindow *)notebook, - item->GetItemLabel().ToStdString()); + item->GetId()-100); AddPage(et,et); } } @@ -174,14 +174,15 @@ void MainWindow::OnRefreshEngineList(wxCommandEvent &event) { // Refresh items CONFIG_OPEN(conf); conf->SetPath("engines/"); - wxString engine_name; + wxString engine_id; long index; - if (conf->GetFirstGroup(engine_name, index)) { + if (conf->GetFirstGroup(engine_id, index)) { std::uint32_t id = 0; do { + wxString engine_name=conf->Read(engine_id+"/name"); manageMenu->Append(100 + id, engine_name, "Configure " + engine_name); id++; - } while (conf->GetNextGroup(engine_name, index)); + } while (conf->GetNextGroup(engine_id, index)); } CONFIG_CLOSE(conf); ApplyPreferences(); // Propagate informations to the tabs that require it -- cgit v1.2.3