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-02-08 11:05:06 +0300
committerYuSanka <yusanka@gmail.com>2019-02-08 11:05:06 +0300
commit3d731bc570954b020f6e7762421dc63955d4bea3 (patch)
tree584a614152fd097d5f9ceda6ac4fb3cf827d72dc /src/slic3r/GUI/Field.cpp
parent9021f84eac59774cd8c287012a82117db7cf30ea (diff)
Fix of #1800
Diffstat (limited to 'src/slic3r/GUI/Field.cpp')
-rw-r--r--src/slic3r/GUI/Field.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp
index 2797bc0b8..28b0d94aa 100644
--- a/src/slic3r/GUI/Field.cpp
+++ b/src/slic3r/GUI/Field.cpp
@@ -464,7 +464,7 @@ void SpinCtrl::BUILD() {
// # As a workaround, we get the new value from $event->GetString and store
// # here temporarily so that we can return it from $self->get_value
std::string value = e.GetString().utf8_str().data();
- if (is_matched(value, "^\\d+$"))
+ if (is_matched(value, "^\\-?\\d+$"))
tmp_value = std::stoi(value);
else tmp_value = -9999;
#ifdef __WXOSX__
@@ -480,7 +480,7 @@ void SpinCtrl::BUILD() {
void SpinCtrl::propagate_value()
{
- if (tmp_value < 0)
+ if (tmp_value == -9999)
on_kill_focus();
else if (boost::any_cast<int>(m_value) != tmp_value)
on_change_field();