From e0babeaf88b2a434b10ffb65824440b1adfaa151 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 1 Feb 2023 12:00:24 +0100 Subject: Improve management of engines tabs --- src/ochess.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/ochess.cpp') 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 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(notebook->GetPage(i))->id== toFocus->id) + notebook->SetSelection(i); + } +} + Openings &MyApp::GetBook() { return Book; } void MyApp::NewGame(TabInfos *tabsrc, std::shared_ptr g) { -- cgit v1.2.3