From 7c02b5c9f4eb48768935990ac8e906b7f813ed14 Mon Sep 17 00:00:00 2001 From: Ocraftyone Date: Sun, 21 Jan 2024 14:11:06 -0500 Subject: [PATCH] Revert to BBL get_line function --- src/slic3r/GUI/OptionsGroup.cpp | 4 ++-- src/slic3r/GUI/OptionsGroup.hpp | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index 65858b0852..81c1a4b61c 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -218,7 +218,7 @@ void OptionsGroup::append_line(const Line& line) 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) { for (auto& l : m_lines) @@ -230,7 +230,7 @@ Line* OptionsGroup::get_line(const std::string& opt_key) } return nullptr; -}*/ +} void OptionsGroup::append_separator() { diff --git a/src/slic3r/GUI/OptionsGroup.hpp b/src/slic3r/GUI/OptionsGroup.hpp index eea187fa5f..1ec5fdc1b3 100644 --- a/src/slic3r/GUI/OptionsGroup.hpp +++ b/src/slic3r/GUI/OptionsGroup.hpp @@ -140,7 +140,7 @@ public: // create controls for the option group void activate_line(Line& line); //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 bool activate(std::function throw_if_canceled = [](){}, int horiz_alignment = wxALIGN_LEFT); @@ -157,13 +157,6 @@ public: 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) { if (m_fields.find(id) == m_fields.end()) return false; m_fields.at(id)->set_value(value, change_event);