mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
FIX: empty param page remain in part tab
Change-Id: I41e90b53b0671df926ede7615e84b586e337b37a Jira: STUDIO-9072 (cherry picked from commit 0948b983d748f5823271b063417e1f514adbc807)
This commit is contained in:
@@ -2700,18 +2700,7 @@ void TabPrintModel::build()
|
||||
|
||||
for (auto p : m_pages) {
|
||||
for (auto g : p->m_optgroups) {
|
||||
auto & lines = const_cast<std::vector<Line>&>(g->get_lines());
|
||||
for (auto & l : lines) {
|
||||
auto & opts = const_cast<std::vector<Option>&>(l.get_options());
|
||||
opts.erase(std::remove_if(opts.begin(), opts.end(), [this](auto & o) {
|
||||
return !has_key(o.opt.opt_key);
|
||||
}), opts.end());
|
||||
l.undo_to_sys = true;
|
||||
}
|
||||
lines.erase(std::remove_if(lines.begin(), lines.end(), [](auto & l) {
|
||||
return l.get_options().empty();
|
||||
}), lines.end());
|
||||
// TODO: remove items from g->m_options;
|
||||
g->remove_option_if([this](auto &key) { return !has_key(key); });
|
||||
g->have_sys_config = [this] { m_back_to_sys = true; return true; };
|
||||
}
|
||||
p->m_optgroups.erase(std::remove_if(p->m_optgroups.begin(), p->m_optgroups.end(), [](auto & g) {
|
||||
|
||||
Reference in New Issue
Block a user