diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 4a313a15d3e..f164579c263 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -962,7 +962,6 @@ void MainFrame::init_tabpanel() else if (panel == m_monitor) { //monitor } - #ifndef __APPLE__ if (sel == tp3DEditor) { m_topbar->EnableUndoRedoItems(); @@ -972,6 +971,9 @@ void MainFrame::init_tabpanel() } #endif + if (panel) + panel->SetFocus(); + /*switch (sel) { case TabPosition::tpHome: show_option(false); diff --git a/src/slic3r/GUI/Monitor.cpp b/src/slic3r/GUI/Monitor.cpp index c1b53f4b558..a096c9e2278 100644 --- a/src/slic3r/GUI/Monitor.cpp +++ b/src/slic3r/GUI/Monitor.cpp @@ -202,6 +202,7 @@ MonitorPanel::~MonitorPanel() auto title = m_tabpanel->GetPageText(m_tabpanel->GetSelection()); m_media_file_panel->SwitchStorage(title == _L("SD Card")); } + page->SetFocus(); }, m_tabpanel->GetId()); //m_status_add_machine_panel = new AddMachinePanel(m_tabpanel); diff --git a/src/slic3r/GUI/Notebook.hpp b/src/slic3r/GUI/Notebook.hpp index 2cd975e9b38..d75898a7cd9 100644 --- a/src/slic3r/GUI/Notebook.hpp +++ b/src/slic3r/GUI/Notebook.hpp @@ -30,7 +30,6 @@ public: wxString GetPageText(size_t n) const; private: - wxWindow* m_parent; wxFlexGridSizer* m_buttons_sizer; wxBoxSizer* m_sizer; // BBS: use Button @@ -398,9 +397,6 @@ private: unsigned m_showTimeout, m_hideTimeout; - - ButtonsListCtrl* m_ctrl{ nullptr }; - }; //#endif // _WIN32 #endif // slic3r_Notebook_hpp_ diff --git a/src/slic3r/GUI/Tabbook.hpp b/src/slic3r/GUI/Tabbook.hpp index b57fb907ab6..0a32abfe685 100644 --- a/src/slic3r/GUI/Tabbook.hpp +++ b/src/slic3r/GUI/Tabbook.hpp @@ -261,7 +261,8 @@ public: { if (event.IsWindowChange()) { // change pages - AdvanceSelection(event.GetDirection()); + //AdvanceSelection(event.GetDirection()); + this->GetGrandParent()->HandleWindowEvent(event); } else { // we get this event in 3 cases