From f08e75efaa9297f557df74ab4ca62df4f9b1a7a7 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Mon, 20 May 2024 20:31:09 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"Added=20a=20deactivate()=20function?= =?UTF-8?q?=20to=20Tab=20so=20when=20switching=20tabs=20it=20hides=20?= =?UTF-8?q?=E2=80=A6=20(#5386)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 7a335590e2770679876a898f1a4a0c3dc6ddeccf. --- src/slic3r/GUI/Tab.cpp | 13 ++----------- src/slic3r/GUI/Tab.hpp | 1 - 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index fb422b595..cf0df73a8 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -5202,10 +5202,6 @@ bool Tab::tree_sel_change_delayed(wxCommandEvent& event) if (m_active_page == page) return false; - if (m_active_page != nullptr) { - m_active_page->deactivate(); - } - m_active_page = page; auto throw_if_canceled = std::function([this](){ @@ -5223,6 +5219,8 @@ bool Tab::tree_sel_change_delayed(wxCommandEvent& event) try { m_page_view->Freeze(); + // clear pages from the controls + clear_pages(); throw_if_canceled(); //BBS: GUI refactor @@ -5927,13 +5925,6 @@ void Page::activate(ConfigOptionMode mode, std::function throw_if_cancel #endif } -void Page::deactivate() -{ - for (auto group : m_optgroups) { - group->Hide(); - } -} - void Page::clear() { for (auto group : m_optgroups) diff --git a/src/slic3r/GUI/Tab.hpp b/src/slic3r/GUI/Tab.hpp index 71f3e3ef2..707e076aa 100644 --- a/src/slic3r/GUI/Tab.hpp +++ b/src/slic3r/GUI/Tab.hpp @@ -104,7 +104,6 @@ public: void reload_config(); void update_visibility(ConfigOptionMode mode, bool update_contolls_visibility); void activate(ConfigOptionMode mode, std::function throw_if_canceled); - void deactivate(); void clear(); void msw_rescale(); void sys_color_changed();