From 66f6c8c786919958c28345ea10589f673cd8f21c Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Fri, 16 Apr 2021 09:48:22 +0200 Subject: [PATCH] Fixed conversion to utf8 of strings entered using Custom G-code dialog --- src/slic3r/GUI/DoubleSlider.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/DoubleSlider.cpp b/src/slic3r/GUI/DoubleSlider.cpp index 29b488b90..84a499d6f 100644 --- a/src/slic3r/GUI/DoubleSlider.cpp +++ b/src/slic3r/GUI/DoubleSlider.cpp @@ -2165,7 +2165,7 @@ static std::string get_custom_code(const std::string& code_in, double height) if (dlg.ShowModal() != wxID_OK) return ""; - value = dlg.GetValue().ToStdString(); + value = into_u8(dlg.GetValue()); valid = GUI::Tab::validate_custom_gcode("Custom G-code", value); } while (!valid); return value; @@ -2173,7 +2173,7 @@ static std::string get_custom_code(const std::string& code_in, double height) if (dlg.ShowModal() != wxID_OK) return ""; - return dlg.GetValue().ToStdString(); + return into_u8(dlg.GetValue()); #endif // ENABLE_VALIDATE_CUSTOM_GCODE }