diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2019-05-06 16:24:50 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2019-05-09 12:43:28 +0300 |
commit | cc98c9bbe2931201f4e5f2eb1c243d299ffdc36a (patch) | |
tree | ae9eddad003701114663a71d104c2bc3f779024a /src/slic3r/GUI/GUI_ObjectManipulation.cpp | |
parent | ec57a7f9711d6e8293c4e181046c9ff6c3e51e8b (diff) |
Fixed disappearing visual hints when the user presses the ENTER key while editing one of the object manipulators fields
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectManipulation.cpp')
-rw-r--r-- | src/slic3r/GUI/GUI_ObjectManipulation.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp index 5c534a3e1..6c7e4df98 100644 --- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp +++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp @@ -527,11 +527,21 @@ void ObjectManipulation::do_scale(int axis, const Vec3d &scale) const void ObjectManipulation::on_change(t_config_option_key opt_key, const boost::any& value) { - // needed to hide the visual hints in 3D scene - wxGetApp().plater()->canvas3D()->handle_sidebar_focus_event(opt_key, false); + Field* field = m_og->get_field(opt_key); + bool enter_pressed = (field != nullptr) && field->get_enter_pressed(); + if (!enter_pressed) + { + // if the change does not come from the user pressing the ENTER key + // we need to hide the visual hints in 3D scene + wxGetApp().plater()->canvas3D()->handle_sidebar_focus_event(opt_key, false); + #ifndef __APPLE__ - m_focused_option = ""; + m_focused_option = ""; #endif // __APPLE__ + } + else + // if the change comes from the user pressing the ENTER key, restore the key state + field->set_enter_pressed(false); if (!m_cache.is_valid()) return; |