Skip to content

Commit

Permalink
Revert "Added a deactivate() function to Tab so when switching tabs i…
Browse files Browse the repository at this point in the history
…t hides … (#5386)"

This reverts commit 7a33559.
  • Loading branch information
SoftFever committed May 20, 2024
1 parent 5914a3a commit f08e75e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
13 changes: 2 additions & 11 deletions src/slic3r/GUI/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<void()>([this](){
Expand All @@ -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
Expand Down Expand Up @@ -5927,13 +5925,6 @@ void Page::activate(ConfigOptionMode mode, std::function<void()> throw_if_cancel
#endif
}

void Page::deactivate()
{
for (auto group : m_optgroups) {
group->Hide();
}
}

void Page::clear()
{
for (auto group : m_optgroups)
Expand Down
1 change: 0 additions & 1 deletion src/slic3r/GUI/Tab.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ class Page// : public wxScrolledWindow
void reload_config();
void update_visibility(ConfigOptionMode mode, bool update_contolls_visibility);
void activate(ConfigOptionMode mode, std::function<void()> throw_if_canceled);
void deactivate();
void clear();
void msw_rescale();
void sys_color_changed();
Expand Down

0 comments on commit f08e75e

Please sign in to comment.