summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-11-16 14:54:38 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-11-17 10:25:47 (GMT)
commitc535df0f286826c5575ec00c7e4c3f811a73918b (patch)
tree50d853a85295176a9282a5bffb3184d703571f9a /src
parentdb803b363785b6892cbf7809aabba1fb7d5fb934 (diff)
downloadQt-c535df0f286826c5575ec00c7e4c3f811a73918b.zip
Qt-c535df0f286826c5575ec00c7e4c3f811a73918b.tar.gz
Qt-c535df0f286826c5575ec00c7e4c3f811a73918b.tar.bz2
Fix tst_QGraphicsView::inputMethodSensitivity autotest
The problem was that the scene was not notified it lost the focus when it was disconnected from the view (with setScene) So when it got back the focus, nothing was updated because the scene thought it still had the focus. Reviewed-by: jasplin
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index 3ef311c..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.)).