summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-11-10 12:44:28 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-11-10 12:46:11 (GMT)
commitb7ae1d97301dcb42997e09f996b103f3701b2139 (patch)
tree61f17559f69f73193f3a64d994a16aa81f13c86b
parent2a0c11e13ff1cba30f3be324dadd14f8d0a1baa6 (diff)
downloadQt-b7ae1d97301dcb42997e09f996b103f3701b2139.zip
Qt-b7ae1d97301dcb42997e09f996b103f3701b2139.tar.gz
Qt-b7ae1d97301dcb42997e09f996b103f3701b2139.tar.bz2
Make sure that the toolbar is in the mainwinow rect for docking
Task-number: QTBUG-2598 Reviewed-by: ogoffart
-rw-r--r--src/gui/widgets/qtoolbararealayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qtoolbararealayout.cpp b/src/gui/widgets/qtoolbararealayout.cpp
index 39d5c66..b7e985c 100644
--- a/src/gui/widgets/qtoolbararealayout.cpp
+++ b/src/gui/widgets/qtoolbararealayout.cpp
@@ -515,7 +515,7 @@ QList<int> QToolBarAreaLayoutInfo::gapIndex(const QPoint &pos, int *minDistance)
} else {
const int dist = distance(pos);
//it will only return a path if the minDistance is higher than the current distance
- if (*minDistance > dist) {
+ if (dist >= 0 && *minDistance > dist) {
*minDistance = dist;
QList<int> result;