From b66f41f43dd740f17e54951fbaf453bd8069c889 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 7 Jan 2019 16:20:50 +0100 Subject: [PATCH] Fixed #1543 --- src/slic3r/GUI/Field.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(m_value) : -99999; if (is_defined_input_value(window, m_opt.type)) { if (fabs(old_val - boost::any_cast(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(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());