mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-24 00:28:38 -07:00
Update OptionsGroup.cpp
This commit is contained in:
parent
0e1c11a9c8
commit
bc80b3d64e
1 changed files with 4 additions and 3 deletions
|
|
@ -164,10 +164,11 @@ void OptionsGroup::remove_option_if(std::function<bool(std::string const &)> con
|
|||
}
|
||||
int it = m_options_mode.size() - 1; //ORCA: add check for separators
|
||||
for (int i = m_lines.size() - 1; i >= 0; --i) {
|
||||
if (m_lines[i].get_options().empty())
|
||||
m_options_mode.erase(m_options_mode.begin() + it);
|
||||
if (!m_lines[i].is_separator())
|
||||
if (!m_lines[i].is_separator()) {
|
||||
if (m_lines[i].get_options().empty())
|
||||
m_options_mode.erase(m_options_mode.begin() + it);
|
||||
it--;
|
||||
}
|
||||
}
|
||||
m_lines.erase(std::remove_if(m_lines.begin(), m_lines.end(), [](auto &l) { return l.get_options().empty(); }), m_lines.end());
|
||||
// TODO: remove items from g->m_options;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue