diff options
author | bubnikv <bubnikv@gmail.com> | 2019-06-18 11:01:29 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2019-06-18 11:01:29 +0300 |
commit | 0c95d4e0d998230258b5f3aa35af3f19da46778a (patch) | |
tree | f2ac054996f9b6810f270ddfb6ebeaa9a1af418b /src/slic3r/GUI/OptionsGroup.cpp | |
parent | a892fa6105382784ab4f775b083aaca23da31397 (diff) | |
parent | 7fe8965c53cafa4783499d9e041ec053f89ee820 (diff) |
Merge remote-tracking branch 'remotes/origin/ys_new_features'
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 014932900..0ed23889e 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) |