diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2023-02-01 12:00:24 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2023-02-01 12:00:24 +0100 |
| commit | e0babeaf88b2a434b10ffb65824440b1adfaa151 (patch) | |
| tree | 7ec40bc44f1c9ed72f6f455c28dd58a5d373a370 /src/ochess.cpp | |
| parent | d9818df8791730130adc5349e863b35de0e1c351 (diff) | |
Improve management of engines tabs
Diffstat (limited to 'src/ochess.cpp')
| -rw-r--r-- | src/ochess.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ochess.cpp b/src/ochess.cpp index 5ef3522..62a5c04 100644 --- a/src/ochess.cpp +++ b/src/ochess.cpp @@ -51,6 +51,14 @@ std::vector<TabInfos *> MyApp::ListTabInfos() { return (tinfos); } +void MyApp::FocusOnTab(TabInfos * toFocus){ + wxAuiNotebook *notebook = ((MainWindow *)this->GetTopWindow())->notebook; + for (int i = 0; i < notebook->GetPageCount(); i++) { + if(dynamic_cast<TabInfos *>(notebook->GetPage(i))->id== toFocus->id) + notebook->SetSelection(i); + } +} + Openings &MyApp::GetBook() { return Book; } void MyApp::NewGame(TabInfos *tabsrc, std::shared_ptr<Game> g) { |
