diff options
author | YuSanka <yusanka@gmail.com> | 2019-09-19 16:28:36 +0300 |
---|---|---|
committer | YuSanka <yusanka@gmail.com> | 2019-09-19 16:28:36 +0300 |
commit | 29f3c938e6c6409be3b1a08b8dc8fca049b2379d (patch) | |
tree | 6304274124e505a02a8eef654bd9a50c5cca50d7 /src/slic3r/GUI/GUI_ObjectLayers.cpp | |
parent | 381735581b7fe14f3b13489ccce6591f0ac64ae6 (diff) |
Fix of SPE-1026 (Height range value works differently if you press enter and if you leave textbox)
Related to GH #2946
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectLayers.cpp')
-rw-r--r-- | src/slic3r/GUI/GUI_ObjectLayers.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectLayers.cpp b/src/slic3r/GUI/GUI_ObjectLayers.cpp index 9053cdd42..d209214ae 100644 --- a/src/slic3r/GUI/GUI_ObjectLayers.cpp +++ b/src/slic3r/GUI/GUI_ObjectLayers.cpp @@ -284,6 +284,9 @@ LayerRangeEditor::LayerRangeEditor( ObjectLayers* parent, wxSize(8 * em_unit(parent->m_parent), wxDefaultCoord), wxTE_PROCESS_ENTER) { this->SetFont(wxGetApp().normal_font()); + + // Reset m_enter_pressed flag to _false_, when value is editing + this->Bind(wxEVT_TEXT, [this](wxEvent&) { m_enter_pressed = false; }, this->GetId()); this->Bind(wxEVT_TEXT_ENTER, [this, edit_fn](wxEvent&) { @@ -307,7 +310,7 @@ LayerRangeEditor::LayerRangeEditor( ObjectLayers* parent, if (!m_enter_pressed) { #ifndef __WXGTK__ /* Update data for next editor selection. - * But under GTK it lucks like there is no information about selected control at e.GetWindow(), + * But under GTK it looks like there is no information about selected control at e.GetWindow(), * so we'll take it from wxEVT_LEFT_DOWN event * */ LayerRangeEditor* new_editor = dynamic_cast<LayerRangeEditor*>(e.GetWindow()); |