exporting patch: # HG changeset patch # User Daniel J Sebald # Date 1527441156 18000 # Sun May 27 12:12:36 2018 -0500 # Node ID 43bb4cffcfa5a6a4a02d7c5401c09b7b97fedc36 # Parent 2cf750f5cb7d47448f4d512c695121d3246c517d Reset the Variable Editor widget float state more thoroughly (bug #53893) * variable-editor.cc (variable_dock_widget::event): In the case of a button press event, reset both state variables m_waiting_for_mouse_button_release and m_waiting_for_mouse_move. (variable_dock_widget::unfloat_float): Similarly, reset the two state variables to ensure no follow-up repeat of the dock/undock process in unexpected situations. diff --git a/libgui/src/variable-editor.cc b/libgui/src/variable-editor.cc --- a/libgui/src/variable-editor.cc +++ b/libgui/src/variable-editor.cc @@ -303,7 +303,10 @@ namespace octave // low-level check of whether docked-widget became a window via // via drag-and-drop if (event->type () == QEvent::MouseButtonPress) - m_waiting_for_mouse_move = false; + { + m_waiting_for_mouse_move = false; + m_waiting_for_mouse_button_release = false; + } if (event->type () == QEvent::MouseMove && m_waiting_for_mouse_move) { m_waiting_for_mouse_move = false; @@ -326,6 +329,8 @@ namespace octave { setFloating (false); setFloating (true); + m_waiting_for_mouse_move = false; + m_waiting_for_mouse_button_release = false; } #else