diff options
author | YuSanka <yusanka@gmail.com> | 2019-05-30 13:41:16 +0300 |
---|---|---|
committer | YuSanka <yusanka@gmail.com> | 2019-05-30 13:41:16 +0300 |
commit | bf56d79354cd74d645ea3e030c476c41d9c649eb (patch) | |
tree | 2f23f3c5fb9ad1fefe8d47835e7dfc7f92f35b39 /src/slic3r/GUI/OptionsGroup.cpp | |
parent | 765d4264ae9380a549bd84bd8d79d776858d8816 (diff) |
Layers sizer updating
Diffstat (limited to 'src/slic3r/GUI/OptionsGroup.cpp')
-rw-r--r-- | src/slic3r/GUI/OptionsGroup.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index 2ac6b00af..67feefa3f 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -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) |