diff options
Diffstat (limited to 'src/widgets/widgets/qtoolbararealayout.cpp')
-rw-r--r-- | src/widgets/widgets/qtoolbararealayout.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/widgets/qtoolbararealayout.cpp b/src/widgets/widgets/qtoolbararealayout.cpp index 54c21b60387..0d7227eb038 100644 --- a/src/widgets/widgets/qtoolbararealayout.cpp +++ b/src/widgets/widgets/qtoolbararealayout.cpp @@ -564,19 +564,19 @@ int QToolBarAreaLayoutInfo::distance(const QPoint &pos) const { switch (dockPos) { case QInternal::LeftDock: - if (pos.y() < rect.bottom()) + if (pos.y() > 0 && pos.y() < rect.bottom()) return pos.x() - rect.right(); break; case QInternal::RightDock: - if (pos.y() < rect.bottom()) + if (pos.y() > 0 && pos.y() < rect.bottom()) return rect.left() - pos.x(); break; case QInternal::TopDock: - if (pos.x() < rect.right()) + if (pos.x() > 0 && pos.x() < rect.right()) return pos.y() - rect.bottom(); break; case QInternal::BottomDock: - if (pos.x() < rect.right()) + if (pos.x() > 0 && pos.x() < rect.right()) return rect.top() - pos.y(); break; |