diff options
Diffstat (limited to 'src/MainWindow.cpp')
| -rw-r--r-- | src/MainWindow.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 27eda12..3a67975 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -120,9 +120,18 @@ void MainWindow::OnMenuItemClick(wxCommandEvent &event) { wxMenuItemList items = manageMenu->GetMenuItems(); for (wxMenuItem *item : items) { if (item->GetId() == id) { + std::uint32_t engine_id=item->GetId()-100; + // Check if not already opened + for(auto i: wxGetApp().ListTabInfos()){ + if(i->type==TabInfos::ENGINE && i->GetEngineId()==engine_id){ + wxGetApp().FocusOnTab(i); + return; + } + } + // Open engine configuration tag: wxLogDebug("Selected %s", item->GetItemLabel()); EngineTab *et = new EngineTab((wxWindow *)notebook, - item->GetId()-100); + engine_id); AddPage(et,et); } } |
