qtwidgets|MDI: Fix showing resize handles

if there was no frame being resized it would be nullptr, and hence
enter that block.

QtQuick not affected since it uses mouse areas to change the cursor
shape
This commit is contained in:
Sergio Martins
2021-03-05 12:19:16 +00:00
parent b099994ac5
commit 9fe11a7ad5

View File

@@ -133,9 +133,13 @@ bool WidgetResizeHandler::eventFilter(QObject *o, QEvent *e)
if (mTarget->isMaximized())
break;
if (isMDI() && DockRegistry::self()->frameInMDIResize() != mTarget) {
// Some other frame is being resized.
return false;
if (isMDI()) {
const Frame *frameBeingResized = DockRegistry::self()->frameInMDIResize();
const bool otherFrameBeingResized = frameBeingResized && frameBeingResized != mTarget;
if (otherFrameBeingResized) {
// only one at a time!
return false;
}
}
auto mouseEvent = static_cast<QMouseEvent *>(e);