From e2830dc33736dc5afede0ea073a9e7671205fed3 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Wed, 5 Sep 2018 12:02:34 +0200 Subject: [PATCH 1/2] Fix to last commit --- xs/src/slic3r/GUI/Field.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/xs/src/slic3r/GUI/Field.cpp b/xs/src/slic3r/GUI/Field.cpp index 44cdb33f5..228d320da 100644 --- a/xs/src/slic3r/GUI/Field.cpp +++ b/xs/src/slic3r/GUI/Field.cpp @@ -224,10 +224,13 @@ namespace Slic3r { namespace GUI { }), temp->GetId()); #endif // __WXGTK__ - temp->Bind(wxEVT_TEXT, ([this](wxCommandEvent) + temp->Bind(wxEVT_TEXT, ([this](wxCommandEvent& evt) { #ifdef __WXGTK__ - bChangedValueEvent = true; + if (bChangedValueEvent) + change_field_value(ent); + else + bChangedValueEvent = true; #else on_change_field(); #endif //__WXGTK__ @@ -266,7 +269,9 @@ namespace Slic3r { namespace GUI { #ifdef __WXGTK__ void TextCtrl::change_field_value(wxEvent& event) { - if (bChangedValueEvent) { + if (event.GetEventType() == wxEVT_TEXT_PASTE) + bChangedValueEvent = true; + else if (bChangedValueEvent) { on_change_field(); bChangedValueEvent = false; } From 8ba48f8dc508fcde572514052cfa1acb91644c4f Mon Sep 17 00:00:00 2001 From: YuSanka Date: Wed, 5 Sep 2018 12:33:04 +0200 Subject: [PATCH 2/2] fixed typo-bug --- xs/src/slic3r/GUI/Field.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/slic3r/GUI/Field.cpp b/xs/src/slic3r/GUI/Field.cpp index 228d320da..f679de1fa 100644 --- a/xs/src/slic3r/GUI/Field.cpp +++ b/xs/src/slic3r/GUI/Field.cpp @@ -228,7 +228,7 @@ namespace Slic3r { namespace GUI { { #ifdef __WXGTK__ if (bChangedValueEvent) - change_field_value(ent); + change_field_value(evt); else bChangedValueEvent = true; #else