MDI: Don't active other resize handlers when resize in progress

When we're resizing a docked dock widget, the other dock widget's
resize handlers should be disabled
This commit is contained in:
Sergio Martins
2021-03-02 22:21:12 +00:00
parent 778c647782
commit bc17c8e5b3
2 changed files with 7 additions and 1 deletions

View File

@@ -158,6 +158,12 @@ bool WidgetResizeHandler::eventFilter(QObject *o, QEvent *e)
case QEvent::MouseMove: {
if (mTarget->isMaximized())
break;
if (isMDI() && DockRegistry::self()->frameInMDIResize() != mTarget) {
// Some other frame is being resized.
return false;
}
auto mouseEvent = static_cast<QMouseEvent *>(e);
m_resizingInProgress = m_resizingInProgress && (mouseEvent->buttons() & Qt::LeftButton);
const bool state = m_resizingInProgress;