From 5f737245011bdec97cae015d4dec80df91c969f9 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 26 Jul 2021 15:06:06 +0200 Subject: [PATCH] Search: Fixed a blinking for the first search --- src/slic3r/GUI/Tab.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index f712615c5..a91b17dd3 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1173,6 +1173,10 @@ void Tab::activate_option(const std::string& opt_key, const wxString& category) if (!cur_item) return; + // We should to activate a tab with searched option, if it doesn't. + // And do it before finding of the cur_item to avoid a case when Tab isn't activated jet and all treeItems are invisible + wxGetApp().mainframe->select_tab(this); + while (cur_item) { auto title = m_treectrl->GetItemText(cur_item); if (page_title != title) { @@ -1184,8 +1188,6 @@ void Tab::activate_option(const std::string& opt_key, const wxString& category) break; } - // we should to activate a tab with searched option, if it doesn't. - wxGetApp().mainframe->select_tab(this); Field* field = get_field(opt_key); // focused selected field