mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-03 02:22:46 +00:00
Added function for the sidetext changing
+ some code reorganization
This commit is contained in:
@@ -128,6 +128,14 @@ public:
|
||||
return out;
|
||||
}
|
||||
|
||||
bool set_side_text(const t_config_option_key& opt_key, const wxString& side_text) {
|
||||
if (m_fields.find(opt_key) == m_fields.end()) return false;
|
||||
auto st = m_fields.at(opt_key)->m_side_text;
|
||||
if (!st) return false;
|
||||
st->SetLabel(side_text);
|
||||
return true;
|
||||
}
|
||||
|
||||
inline void enable() { for (auto& field : m_fields) field.second->enable(); }
|
||||
inline void disable() { for (auto& field : m_fields) field.second->disable(); }
|
||||
void set_flag(ogDrawFlag flag) { m_flag = flag; }
|
||||
|
||||
Reference in New Issue
Block a user