diff options
author | Morten Sørvig <msorvig@trolltech.com> | 2009-06-16 11:20:15 (GMT) |
---|---|---|
committer | Morten Sørvig <msorvig@trolltech.com> | 2009-06-16 11:20:15 (GMT) |
commit | c41591d57377cd7c520efc93d9c087ad34d2bb6f (patch) | |
tree | 975a8573da68b3f9bd169ecf607f7492f723a003 /src/gui/painting | |
parent | 1e6b142fa2833f55972d6d4aa7dde0bb215c2f25 (diff) | |
parent | acc764552c552df31719af561e285886085371e9 (diff) | |
download | Qt-c41591d57377cd7c520efc93d9c087ad34d2bb6f.zip Qt-c41591d57377cd7c520efc93d9c087ad34d2bb6f.tar.gz Qt-c41591d57377cd7c520efc93d9c087ad34d2bb6f.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qregion.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp index c4cd77a..03e01c9 100644 --- a/src/gui/painting/qregion.cpp +++ b/src/gui/painting/qregion.cpp @@ -698,6 +698,8 @@ bool QRegion::intersects(const QRegion ®ion) const if (!rect_intersects(boundingRect(), region.boundingRect())) return false; + if (numRects() == 1 && region.numRects() == 1) + return true; const QVector<QRect> myRects = rects(); const QVector<QRect> otherRects = region.rects(); @@ -723,6 +725,8 @@ bool QRegion::intersects(const QRect &rect) const const QRect r = rect.normalized(); if (!rect_intersects(boundingRect(), r)) return false; + if (numRects() == 1) + return true; const QVector<QRect> myRects = rects(); for (QVector<QRect>::const_iterator it = myRects.constBegin(); it < myRects.constEnd(); ++it) |