summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2009-07-06 08:19:01 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2009-07-06 09:52:53 (GMT)
commitc4b7fab9e8296915fff700704db26161bac8df0c (patch)
treed4e70e81c2cc1b149f79cca146cc739e804dde19 /src/gui/kernel
parent423d40c56f090f3619c8df5667dcfcb0c0a0dc32 (diff)
downloadQt-c4b7fab9e8296915fff700704db26161bac8df0c.zip
Qt-c4b7fab9e8296915fff700704db26161bac8df0c.tar.gz
Qt-c4b7fab9e8296915fff700704db26161bac8df0c.tar.bz2
Fix to paint big widgets in a scroll area
If a big widget is inside a scroll area, and this widget is in the limits of XCOORD_MAX, its child might not be inside the limits. The child is then limited to wrect, but wrect might not be on the screen because the parent is scrolled. To avoid this problem, the widgets position should not influence whether wrect is used or not. Task-number: 144779 Reviewed-by: nrc
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget_mac.mm8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index d1e4230..b0531ec 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -3823,7 +3823,6 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect)
Qt coordinate system for parent
X coordinate system for parent (relative to parent's wrect).
*/
- QRect validRange(-XCOORD_MAX,-XCOORD_MAX, 2*XCOORD_MAX, 2*XCOORD_MAX);
QRect wrectRange(-WRECT_MAX,-WRECT_MAX, 2*WRECT_MAX, 2*WRECT_MAX);
QRect wrect;
//xrect is the X geometry of my X widget. (starts out in parent's Qt coord sys, and ends up in parent's X coord sys)
@@ -3901,7 +3900,7 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect)
}
}
- if (!validRange.contains(xrect)) {
+ if (xrect.height() > XCOORD_MAX || xrect.width() > XCOORD_MAX) {
// we are too big, and must clip
xrect &=wrectRange;
wrect = xrect;
@@ -3949,10 +3948,9 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect)
qt_mac_update_widget_posisiton(q, oldRect, xrect);
- if (jump) {
- updateSystemBackground();
+ if (jump)
q->update();
- }
+
if (mapWindow && !dontShow) {
q->setAttribute(Qt::WA_Mapped);
#ifndef QT_MAC_USE_COCOA