diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index e9487ab61..451675d8d 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -97,7 +97,7 @@ void PresetCollection::update_editor_ui(wxBitmapComboBox *ui) size_t n_visible = this->num_visible(); size_t n_choice = size_t(ui->GetCount()); - std::string name_selected = ui->GetStringSelection().ToUTF8(); + std::string name_selected = ui->GetStringSelection().ToUTF8().data(); if (boost::algorithm::iends_with(name_selected, g_suffix_modified)) // Remove the g_suffix_modified. name_selected.erase(name_selected.end() - g_suffix_modified.size(), name_selected.end()); diff --git a/xs/src/slic3r/GUI/Preset.hpp b/xs/src/slic3r/GUI/Preset.hpp index c01c5a8fb..9ee7b54ee 100644 --- a/xs/src/slic3r/GUI/Preset.hpp +++ b/xs/src/slic3r/GUI/Preset.hpp @@ -20,7 +20,7 @@ public: TYPE_PRINTER, }; - Preset(Type type, const std::string &name, bool is_default = false) : type(type), name(name), is_default(is_default) {} + Preset(Type type, const std::string &name, bool is_default = false) : type(type), is_default(is_default), name(name) {} Type type = TYPE_INVALID; @@ -54,7 +54,7 @@ public: DynamicPrintConfig& load(const std::vector &keys); // Set the is_dirty flag if the provided config is different from the active one. - bool set_dirty(const DynamicPrintConfig &config) { this->is_dirty = ! this->config.diff(config).empty(); } + void set_dirty(const DynamicPrintConfig &config) { this->is_dirty = ! this->config.diff(config).empty(); } void reset_dirty() { this->is_dirty = false; } bool enable_compatible(const std::string &active_printer); };