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:
authorYuSanka <yusanka@gmail.com>2019-01-07 18:20:50 +0300
committerYuSanka <yusanka@gmail.com>2019-01-07 18:20:50 +0300
commitb66f41f43dd740f17e54951fbaf453bd8069c889 (patch)
tree07b9223e5eb90bb6ff18e99b1792e7a022410afa /src/slic3r/GUI/Field.cpp
parent2f4adc1906316158cac81b263150c3372e6ea745 (diff)
Fixed #1543
Diffstat (limited to 'src/slic3r/GUI/Field.cpp')
-rw-r--r--src/slic3r/GUI/Field.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp
index 928a6236e..91052570d 100644
--- a/src/slic3r/GUI/Field.cpp
+++ b/src/slic3r/GUI/Field.cpp
@@ -474,6 +474,7 @@ void Choice::BUILD() {
if (temp->GetWindowStyle() != wxCB_READONLY) {
temp->Bind(wxEVT_KILL_FOCUS, ([this](wxEvent& e) {
e.Skip();
+ if (m_opt.type == coStrings) return;
double old_val = !m_value.empty() ? boost::any_cast<double>(m_value) : -99999;
if (is_defined_input_value<wxComboBox>(window, m_opt.type)) {
if (fabs(old_val - boost::any_cast<double>(get_value())) <= 0.0001)
@@ -692,7 +693,7 @@ boost::any& Choice::get_value()
}
else if (m_opt.gui_type == "f_enum_open") {
const int ret_enum = static_cast<wxComboBox*>(window)->GetSelection();
- if (ret_enum < 0 || m_opt.enum_values.empty())
+ if (ret_enum < 0 || m_opt.enum_values.empty() || m_opt.type == coStrings)
get_value_by_opt_type(ret_str);
else
m_value = atof(m_opt.enum_values[ret_enum].c_str());