diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-03-08 07:17:15 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-03-08 07:17:15 (GMT) |
commit | 9b06c2dd119f3c4442f7b26756728bb9c7fefb4a (patch) | |
tree | 8f02caf1d949a8159a985515435fd1159c0792ac /src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | |
parent | 4d8214afabd5e093c02b0de0e72f24139af6660f (diff) | |
download | Qt-9b06c2dd119f3c4442f7b26756728bb9c7fefb4a.zip Qt-9b06c2dd119f3c4442f7b26756728bb9c7fefb4a.tar.gz Qt-9b06c2dd119f3c4442f7b26756728bb9c7fefb4a.tar.bz2 |
clearFocus() before setParentItem(0) on an item with focus.
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index 55f1c89..6bad4da 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -927,6 +927,8 @@ QDeclarativeVisualDataModel::ReleaseFlags QDeclarativeVisualDataModel::release(Q if (inPackage) { emit destroyingPackage(qobject_cast<QDeclarativePackage*>(obj)); } else { + if (item->hasFocus()) + item->clearFocus(); item->setOpacity(0.0); static_cast<QGraphicsItem*>(item)->setParentItem(0); } |