summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-22 08:09:53 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-22 10:39:33 (GMT)
commit5281f264dc605766ba82c36fc2c88055234824ff (patch)
tree0c16efb51157d22496b44b4885f11bc2b89d51a7 /src/gui
parent4c515cebc653e44fe6374058b205610592128ea4 (diff)
downloadQt-5281f264dc605766ba82c36fc2c88055234824ff.zip
Qt-5281f264dc605766ba82c36fc2c88055234824ff.tar.gz
Qt-5281f264dc605766ba82c36fc2c88055234824ff.tar.bz2
Moving a child widget right after show() does not work as expected.
The problem was that we did an accelerated move, i.e. scrolled the widget's contents in the backing store and repainted the old area. We cannot do this trick when the widget has been invalidated (show(), resize()). In this case the widget had never been painted, so we basically scrolled the content of its parent and the widget itself appeared as invisible. Auto-test included. Task-number: 255117 Reviewed-by: Paul
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qbackingstore.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index 0f7933c..3bbdf7f 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -258,7 +258,10 @@ void QWidgetBackingStore::unflushPaint(QWidget *widget, const QRegion &rgn)
bool QWidgetBackingStore::bltRect(const QRect &rect, int dx, int dy, QWidget *widget)
{
const QPoint pos(tlwOffset + widget->mapTo(tlw, rect.topLeft()));
- return windowSurface->scroll(QRect(pos, rect.size()), dx, dy);
+ const QRect tlwRect(QRect(pos, rect.size()));
+ if (dirty.intersects(tlwRect))
+ return false; // We don't want to scroll junk.
+ return windowSurface->scroll(tlwRect, dx, dy);
}
void QWidgetBackingStore::releaseBuffer()