FIX: OptionsGroup::get_line with multiple options

Change-Id: I9c96b0e5de5674e558aeb66d306da3519750fa65
Jira: STUDIO-10887
This commit is contained in:
chunmao.guo 2025-03-17 10:48:20 +08:00 committed by lane.wei
parent d415d8e728
commit f0656ee986
1 changed files with 3 additions and 2 deletions

View File

@ -230,8 +230,9 @@ Line* OptionsGroup::get_line(const std::string& opt_key)
{ {
for (int index = 0; index < m_lines.size(); index++) for (int index = 0; index < m_lines.size(); index++)
{ {
if (m_lines[index].get_first_option_key() == opt_key) for (auto & opt : m_lines[index].get_options())
return &(m_lines[index]); if (opt.opt_id == opt_key)
return &(m_lines[index]);
} }
return nullptr; return nullptr;