From 8fb3a44a4e293ca01eb897a5706ef8283c8c9770 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 24 Sep 2020 15:41:48 +0200 Subject: Fixed highlighting of the searched option + Create controls only on the shown and active tab + Line class : deleted unused sizer + In GUI_Utils added TaskTimer class for the print a time of some task duration + BedShapeDialog:: activated options_groups + commented some unused code --- src/slic3r/GUI/OptionsGroup.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/slic3r/GUI/OptionsGroup.cpp') diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index d96b0565a..13c577662 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -138,7 +138,6 @@ void OptionsGroup::append_line(const Line& line) m_lines.emplace_back(line); if (line.full_width && ( - line.sizer != nullptr || line.widget != nullptr || !line.get_extra_widgets().empty()) ) @@ -156,14 +155,9 @@ void OptionsGroup::append_line(const Line& line) void OptionsGroup::activate_line(Line& line) { if (line.full_width && ( - line.sizer != nullptr || line.widget != nullptr || !line.get_extra_widgets().empty()) ) { - if (line.sizer != nullptr) { - sizer->Add(line.sizer, 0, wxEXPAND | wxALL, wxOSX ? 0 : 15); - return; - } if (line.widget != nullptr) { sizer->Add(line.widget(this->ctrl_parent()), 0, wxEXPAND | wxALL, wxOSX ? 0 : 15); return; @@ -585,7 +579,7 @@ bool ConfigOptionsGroup::is_visible(ConfigOptionMode mode) bool ConfigOptionsGroup::update_visibility(ConfigOptionMode mode) { - if (m_options_mode.empty()) + if (m_options_mode.empty() || !m_grid_sizer) return true; int opt_mode_size = m_options_mode.size(); if (m_grid_sizer->GetEffectiveRowsCount() != opt_mode_size && -- cgit v1.2.3