summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsview.cpp
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2009-11-17 22:56:58 (GMT)
committerJustin McPherson <justin.mcpherson@nokia.com>2009-11-17 22:56:58 (GMT)
commite22ca6088407987cb69ccd03f162b431d5c2bf99 (patch)
tree12bb1de5c59670ad2c966cea60b9fd4d28dead2e /src/gui/graphicsview/qgraphicsview.cpp
parentf2b02ed855f7149afca0cc2e046c09c54a2d4444 (diff)
parenta61adccf96a8ceefbf1150966adda3f6d226ec6d (diff)
downloadQt-e22ca6088407987cb69ccd03f162b431d5c2bf99.zip
Qt-e22ca6088407987cb69ccd03f162b431d5c2bf99.tar.gz
Qt-e22ca6088407987cb69ccd03f162b431d5c2bf99.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/graphicsview/qgraphicsview.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index 27fd09e..3f9f443 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -1517,6 +1517,8 @@ void QGraphicsView::setScene(QGraphicsScene *scene)
QEvent windowDeactivate(QEvent::WindowDeactivate);
QApplication::sendEvent(d->scene, &windowDeactivate);
}
+ if(hasFocus())
+ d->scene->clearFocus();
}
// Assign the new scene and update the contents (scrollbars, etc.)).
@@ -3275,13 +3277,10 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
// Determine the exposed region
d->exposedRegion = event->region();
- if (d->exposedRegion.isEmpty())
- d->exposedRegion = viewport()->rect();
QRectF exposedSceneRect = mapToScene(d->exposedRegion.boundingRect()).boundingRect();
// Set up the painter
QPainter painter(viewport());
- painter.setClipRect(event->rect(), Qt::IntersectClip);
#ifndef QT_NO_RUBBERBAND
if (d->rubberBanding && !d->rubberBandRect.isEmpty())
painter.save();