mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 10:17:55 -06:00
Will clang & gcc eat it now?
This commit is contained in:
parent
f529269f62
commit
ea8b3a5dc0
4 changed files with 4 additions and 4 deletions
|
@ -220,7 +220,7 @@ void SpinCtrl::BUILD() {
|
||||||
// # gets the old one, and on_kill_focus resets the control to the old value.
|
// # gets the old one, and on_kill_focus resets the control to the old value.
|
||||||
// # As a workaround, we get the new value from $event->GetString and store
|
// # As a workaround, we get the new value from $event->GetString and store
|
||||||
// # here temporarily so that we can return it from $self->get_value
|
// # here temporarily so that we can return it from $self->get_value
|
||||||
std::string value = e.GetString().utf8_str();
|
std::string value = e.GetString().utf8_str().data();
|
||||||
if (is_matched(value, "^\\d+$"))
|
if (is_matched(value, "^\\d+$"))
|
||||||
tmp_value = std::stoi(value);
|
tmp_value = std::stoi(value);
|
||||||
on_change_field(e);
|
on_change_field(e);
|
||||||
|
|
|
@ -93,7 +93,7 @@ public:
|
||||||
// return a non-owning pointer reference
|
// return a non-owning pointer reference
|
||||||
inline /*const*/ Field* get_field(t_config_option_key id) const { try { return m_fields.at(id).get(); } catch (std::out_of_range e) { return nullptr; } }
|
inline /*const*/ Field* get_field(t_config_option_key id) const { try { return m_fields.at(id).get(); } catch (std::out_of_range e) { return nullptr; } }
|
||||||
bool set_value(t_config_option_key id, boost::any value) { try { m_fields.at(id)->set_value(value); return true; } catch (std::out_of_range e) { return false; } }
|
bool set_value(t_config_option_key id, boost::any value) { try { m_fields.at(id)->set_value(value); return true; } catch (std::out_of_range e) { return false; } }
|
||||||
boost::any get_value(t_config_option_key id) { try { return m_fields.at(id)->get_value(); } catch (std::out_of_range e) { ; } }
|
boost::any get_value(t_config_option_key id) { boost::any out; try { out = m_fields.at(id)->get_value(); } catch (std::out_of_range e) { ; } return out; }
|
||||||
|
|
||||||
inline void enable() { for (auto& field : m_fields) field.second->enable(); }
|
inline void enable() { for (auto& field : m_fields) field.second->enable(); }
|
||||||
inline void disable() { for (auto& field : m_fields) field.second->disable(); }
|
inline void disable() { for (auto& field : m_fields) field.second->disable(); }
|
||||||
|
|
|
@ -86,7 +86,7 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle)
|
||||||
m_treectrl->Bind(wxEVT_COMBOBOX, &Tab::OnComboBox, this);
|
m_treectrl->Bind(wxEVT_COMBOBOX, &Tab::OnComboBox, this);
|
||||||
|
|
||||||
m_presets_choice->Bind(wxEVT_COMBOBOX, ([this](wxCommandEvent e){
|
m_presets_choice->Bind(wxEVT_COMBOBOX, ([this](wxCommandEvent e){
|
||||||
select_preset(m_presets_choice->wxComboBox::GetStringSelection());
|
select_preset(static_cast<const wxComboBox*>(m_presets_choice)->GetStringSelection());
|
||||||
}));
|
}));
|
||||||
|
|
||||||
m_btn_save_preset->Bind(wxEVT_BUTTON, ([this](wxCommandEvent e){ save_preset(); }));
|
m_btn_save_preset->Bind(wxEVT_BUTTON, ([this](wxCommandEvent e){ save_preset(); }));
|
||||||
|
|
|
@ -135,7 +135,7 @@ public:
|
||||||
|
|
||||||
void OnTreeSelChange(wxTreeEvent& event);
|
void OnTreeSelChange(wxTreeEvent& event);
|
||||||
void OnKeyDown(wxKeyEvent& event);
|
void OnKeyDown(wxKeyEvent& event);
|
||||||
void OnComboBox(wxCommandEvent& event) { select_preset(m_presets_choice->wxComboBox::GetStringSelection()); }
|
void OnComboBox(wxCommandEvent& event) { select_preset(static_cast<const wxComboBox*>(m_presets_choice)->GetStringSelection()); }
|
||||||
void save_preset(std::string name = "");
|
void save_preset(std::string name = "");
|
||||||
void delete_preset();
|
void delete_preset();
|
||||||
void toggle_show_hide_incompatible();
|
void toggle_show_hide_incompatible();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue