diff options
Diffstat (limited to 'src/MainWindow.cpp')
| -rw-r--r-- | src/MainWindow.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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 |
