From f0acf4f745e65798fc4bd82acaf40bb756937cda Mon Sep 17 00:00:00 2001 From: YuSanka Date: Wed, 15 May 2019 10:41:14 +0200 Subject: [PATCH 1/2] Fixed a manually editing of a "Filament Settings -> Advanced -> Filament type" (#2232) --- src/slic3r/GUI/Field.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp index 9443f3658..e3a9bb2c7 100644 --- a/src/slic3r/GUI/Field.cpp +++ b/src/slic3r/GUI/Field.cpp @@ -608,7 +608,11 @@ void Choice::BUILD() { if (m_is_editable) { temp->Bind(wxEVT_KILL_FOCUS, ([this](wxEvent& e) { e.Skip(); - if (m_opt.type == coStrings) return; + if (m_opt.type == coStrings) { + on_change_field(); + return; + } + double old_val = !m_value.empty() ? boost::any_cast(m_value) : -99999; if (is_defined_input_value(window, m_opt.type)) { if (fabs(old_val - boost::any_cast(get_value())) <= 0.0001) From 64d4e7cd0c55346d907ab50df066d5ea7e1dc499 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 15 May 2019 10:59:00 +0200 Subject: [PATCH 2/2] Follow-up of 8ae1dfd4d0184e854a419b6eb218ddc2aac94f1b -> Fixed build on OsX --- src/slic3r/GUI/Plater.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 568c84fb5..948b4948e 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -2948,14 +2948,15 @@ const wxString& Plater::priv::get_project_filename() const void Plater::priv::set_project_filename(const wxString& filename) { - wxString copy = filename; + std::string copy = into_u8(filename); if (boost::algorithm::iends_with(copy, ".zip.amf")) // we remove the .zip part of the extension copy = boost::ireplace_last_copy(copy, ".zip.", "."); // we force 3mf extension - boost::filesystem::path full_path = into_path(copy); - full_path.replace_extension("3mf"); + boost::filesystem::path full_path(copy); + if (!full_path.empty()) + full_path.replace_extension("3mf"); m_project_filename = from_path(full_path); wxGetApp().mainframe->update_title();