Revert to BBL get_line function

This commit is contained in:
Ocraftyone 2024-01-21 14:11:06 -05:00
parent 9f44e151ba
commit 7c02b5c9f4
No known key found for this signature in database
GPG key ID: 85836ED21AD4D125
2 changed files with 3 additions and 10 deletions

View file

@ -218,7 +218,7 @@ void OptionsGroup::append_line(const Line& line)
m_options_mode.push_back(option_set[0].opt.mode); m_options_mode.push_back(option_set[0].opt.mode);
} }
/*//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 (auto& l : m_lines)
@ -230,7 +230,7 @@ Line* OptionsGroup::get_line(const std::string& opt_key)
} }
return nullptr; return nullptr;
}*/ }
void OptionsGroup::append_separator() void OptionsGroup::append_separator()
{ {

View file

@ -140,7 +140,7 @@ public:
// create controls for the option group // create controls for the option group
void activate_line(Line& line); void activate_line(Line& line);
//BBS: get line for opt_key //BBS: get line for opt_key
// Line* get_line(const std::string& opt_key); Line* get_line(const std::string& opt_key);
// create all controls for the option group from the m_lines // create all controls for the option group from the m_lines
bool activate(std::function<void()> throw_if_canceled = [](){}, int horiz_alignment = wxALIGN_LEFT); bool activate(std::function<void()> throw_if_canceled = [](){}, int horiz_alignment = wxALIGN_LEFT);
@ -157,13 +157,6 @@ public:
return m_fields.at(id).get(); return m_fields.at(id).get();
} }
inline Line* get_line(const t_config_option_key& id) {
for (Line& line : m_lines)
if (line.has_only_option(id))
return &line;
return nullptr;
}
bool set_value(const t_config_option_key& id, const boost::any& value, bool change_event = false) { bool set_value(const t_config_option_key& id, const boost::any& value, bool change_event = false) {
if (m_fields.find(id) == m_fields.end()) return false; if (m_fields.find(id) == m_fields.end()) return false;
m_fields.at(id)->set_value(value, change_event); m_fields.at(id)->set_value(value, change_event);