Commit cc613558 authored by Fabian Vogt's avatar Fabian Vogt
Browse files

Fix SplitterProxy not clearing when above another QSplitterHandle

When two SplitterHandles are next to each other, like at the intersection of a
horizontal and vertical splitter (|-), then it's possible that hiding the proxy
of one of those handles causes the other handle to gain focus immediately,
which activates the SplitterProxy again. Before this patch, it would then
continue clearing after reenabling itself, leading to an inconsistent state.

BUG: 431921
(cherry picked from commit d201a1f1)
parent 10fbc0ea
...@@ -352,11 +352,6 @@ namespace Breeze ...@@ -352,11 +352,6 @@ namespace Breeze
// release mouse // release mouse
if( mouseGrabber() == this ) releaseMouse(); if( mouseGrabber() == this ) releaseMouse();
// hide
parentWidget()->setUpdatesEnabled(false);
hide();
parentWidget()->setUpdatesEnabled(true);
// send hover event // send hover event
if( _splitter ) if( _splitter )
{ {
...@@ -365,7 +360,6 @@ namespace Breeze ...@@ -365,7 +360,6 @@ namespace Breeze
_splitter.data()->mapFromGlobal(QCursor::pos()), _hook); _splitter.data()->mapFromGlobal(QCursor::pos()), _hook);
QCoreApplication::sendEvent( _splitter.data(), &hoverEvent ); QCoreApplication::sendEvent( _splitter.data(), &hoverEvent );
_splitter.clear(); _splitter.clear();
} }
// kill timer if any // kill timer if any
...@@ -375,6 +369,12 @@ namespace Breeze ...@@ -375,6 +369,12 @@ namespace Breeze
_timerId = 0; _timerId = 0;
} }
// hide
parentWidget()->setUpdatesEnabled(false);
// Note: This sends a synthetic mouse event to the widget below (to get focus), which might be
// another SplitterHandle, therefore enabling this SplitterProxy again!
hide();
parentWidget()->setUpdatesEnabled(true);
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment