Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2019-07-22 10:36:55 +0300
committerbubnikv <bubnikv@gmail.com>2019-07-22 10:36:55 +0300
commit8112d80fa2ffd21ce6b4f20549fc39048445747b (patch)
tree7b9526fce88f88d955e382d1bf0a81b449e4f7fa /src/slic3r/GUI/OptionsGroup.cpp
parent040f1fedff1f4caa310622c54adbc3d5d5b97aab (diff)
parentb60b44ed5e297c3fa18097fc8123db83bdd22758 (diff)
Merge branch 'master' into ys_overrides
Diffstat (limited to 'src/slic3r/GUI/OptionsGroup.cpp')
-rw-r--r--src/slic3r/GUI/OptionsGroup.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp
index 2b70dfb4c..f4f97a47d 100644
--- a/src/slic3r/GUI/OptionsGroup.cpp
+++ b/src/slic3r/GUI/OptionsGroup.cpp
@@ -266,7 +266,7 @@ void OptionsGroup::append_line(const Line& line, wxStaticText** full_Label/* = n
is_sizer_field(field) ?
v_sizer->Add(field->getSizer(), 0, wxEXPAND) :
v_sizer->Add(field->getWindow(), 0, wxEXPAND);
- return;
+ break;//return;
}
is_sizer_field(field) ?
@@ -300,7 +300,7 @@ void OptionsGroup::append_line(const Line& line, wxStaticText** full_Label/* = n
{
// extra widget for non-staticbox option group (like for the frequently used parameters on the sidebar) should be wxALIGN_RIGHT
const auto v_sizer = new wxBoxSizer(wxVERTICAL);
- sizer->Add(v_sizer, 1, wxEXPAND);
+ sizer->Add(v_sizer, option_set.size() == 1 ? 0 : 1, wxEXPAND);
v_sizer->Add(extra_widget(this->ctrl_parent()), 0, wxALIGN_RIGHT);
return;
}
@@ -320,6 +320,17 @@ Line OptionsGroup::create_single_option_line(const Option& option) const {
return retval;
}
+void OptionsGroup::clear_fields_except_of(const std::vector<std::string> left_fields)
+{
+ auto it = m_fields.begin();
+ while (it != m_fields.end()) {
+ if (std::find(left_fields.begin(), left_fields.end(), it->first) == left_fields.end())
+ it = m_fields.erase(it);
+ else
+ it++;
+ }
+}
+
void OptionsGroup::on_set_focus(const std::string& opt_key)
{
if (m_set_focus != nullptr)