Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2020-02-21 14:17:46 +0300
committerbubnikv <bubnikv@gmail.com>2020-02-21 14:17:46 +0300
commit377b9e4b45bb7157f580ea92093fc56e24b83203 (patch)
tree0dae3afa123e3eabe9b5cc3157679444095e9532 /src/slic3r/GUI
parentbcdc8829e4439dbc7f18c7a3f4559c4ea6d9fbd1 (diff)
ImGUI input_double wrapper for wxString label.
Possible fix of Fix encoding in Hollowing #3683
Diffstat (limited to 'src/slic3r/GUI')
-rw-r--r--src/slic3r/GUI/ImGuiWrapper.cpp6
-rw-r--r--src/slic3r/GUI/ImGuiWrapper.hpp1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp
index 90ef017fc..3efa800a9 100644
--- a/src/slic3r/GUI/ImGuiWrapper.cpp
+++ b/src/slic3r/GUI/ImGuiWrapper.cpp
@@ -286,6 +286,12 @@ bool ImGuiWrapper::input_double(const std::string &label, const double &value, c
return ImGui::InputDouble(label.c_str(), const_cast<double*>(&value), 0.0f, 0.0f, format.c_str());
}
+bool ImGuiWrapper::input_double(const wxString &label, const double &value, const std::string &format)
+{
+ auto label_utf8 = into_u8(label);
+ return input_double(label_utf8, value, format);
+}
+
bool ImGuiWrapper::input_vec3(const std::string &label, const Vec3d &value, float width, const std::string &format)
{
bool value_changed = false;
diff --git a/src/slic3r/GUI/ImGuiWrapper.hpp b/src/slic3r/GUI/ImGuiWrapper.hpp
index 5118af036..417561881 100644
--- a/src/slic3r/GUI/ImGuiWrapper.hpp
+++ b/src/slic3r/GUI/ImGuiWrapper.hpp
@@ -63,6 +63,7 @@ public:
bool button(const wxString &label);
bool radio_button(const wxString &label, bool active);
bool input_double(const std::string &label, const double &value, const std::string &format = "%.3f");
+ bool input_double(const wxString &label, const double &value, const std::string &format = "%.3f");
bool input_vec3(const std::string &label, const Vec3d &value, float width, const std::string &format = "%.3f");
bool checkbox(const wxString &label, bool &value);
void text(const char *label);