diff --git a/xs/src/slic3r/GUI/Field.cpp b/xs/src/slic3r/GUI/Field.cpp index 56d3d55d5e..fd4c5f8c9e 100644 --- a/xs/src/slic3r/GUI/Field.cpp +++ b/xs/src/slic3r/GUI/Field.cpp @@ -220,7 +220,7 @@ void SpinCtrl::BUILD() { // # 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 // # 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+$")) tmp_value = std::stoi(value); on_change_field(e); diff --git a/xs/src/slic3r/GUI/OptionsGroup.hpp b/xs/src/slic3r/GUI/OptionsGroup.hpp index 3989461776..66d521f7c7 100644 --- a/xs/src/slic3r/GUI/OptionsGroup.hpp +++ b/xs/src/slic3r/GUI/OptionsGroup.hpp @@ -93,7 +93,7 @@ public: // 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; } } 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 disable() { for (auto& field : m_fields) field.second->disable(); } diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 0732969fad..3ebcf34057 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -86,7 +86,7 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) m_treectrl->Bind(wxEVT_COMBOBOX, &Tab::OnComboBox, this); m_presets_choice->Bind(wxEVT_COMBOBOX, ([this](wxCommandEvent e){ - select_preset(m_presets_choice->wxComboBox::GetStringSelection()); + select_preset(static_cast(m_presets_choice)->GetStringSelection()); })); m_btn_save_preset->Bind(wxEVT_BUTTON, ([this](wxCommandEvent e){ save_preset(); })); diff --git a/xs/src/slic3r/GUI/Tab.h b/xs/src/slic3r/GUI/Tab.h index aa69912936..aa8008b513 100644 --- a/xs/src/slic3r/GUI/Tab.h +++ b/xs/src/slic3r/GUI/Tab.h @@ -135,7 +135,7 @@ public: void OnTreeSelChange(wxTreeEvent& event); void OnKeyDown(wxKeyEvent& event); - void OnComboBox(wxCommandEvent& event) { select_preset(m_presets_choice->wxComboBox::GetStringSelection()); } + void OnComboBox(wxCommandEvent& event) { select_preset(static_cast(m_presets_choice)->GetStringSelection()); } void save_preset(std::string name = ""); void delete_preset(); void toggle_show_hide_incompatible();