mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 20:03:47 +00:00
FIX: OptionsGroup::get_line with multiple options
Change-Id: I9c96b0e5de5674e558aeb66d306da3519750fa65 Jira: STUDIO-10887 (cherry picked from commit f0656ee986189d5ca34a088c3e584c4f973e1538)
This commit is contained in:
@@ -244,12 +244,11 @@ void OptionsGroup::append_line(const Line& line)
|
|||||||
//BBS: get line for opt_key
|
//BBS: get line for opt_key
|
||||||
Line* OptionsGroup::get_line(const std::string& 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())
|
for (auto & opt : m_lines[index].get_options())
|
||||||
continue;
|
if (opt.opt_id == opt_key)
|
||||||
if (l.get_first_option_key() == opt_key)
|
return &(m_lines[index]);
|
||||||
return &l;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user