mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-07 23:37:43 -07:00
FIX: OptionsGroup::get_line with multiple options
Change-Id: I9c96b0e5de5674e558aeb66d306da3519750fa65 Jira: STUDIO-10887 (cherry picked from commit f0656ee986189d5ca34a088c3e584c4f973e1538)
This commit is contained in:
parent
5105f1d28b
commit
7e15661a42
1 changed files with 4 additions and 5 deletions
|
|
@ -244,12 +244,11 @@ void OptionsGroup::append_line(const Line& line)
|
|||
//BBS: get line for opt_key
|
||||
Line* OptionsGroup::get_line(const std::string& opt_key)
|
||||
{
|
||||
for (auto& l : m_lines)
|
||||
for (int index = 0; index < m_lines.size(); index++)
|
||||
{
|
||||
if(l.is_separator())
|
||||
continue;
|
||||
if (l.get_first_option_key() == opt_key)
|
||||
return &l;
|
||||
for (auto & opt : m_lines[index].get_options())
|
||||
if (opt.opt_id == opt_key)
|
||||
return &(m_lines[index]);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue