mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
Revert to BBL get_line function
This commit is contained in:
parent
9f44e151ba
commit
7c02b5c9f4
2 changed files with 3 additions and 10 deletions
|
@ -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()
|
||||||
{
|
{
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue