diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index 6fa4702af8..eab60e78d4 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -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;