diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2021-10-22 17:36:26 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2021-10-26 12:50:08 +0000 |
commit | f0d0ce4c01cf06fe14e46bb0676980cfd37490e2 (patch) | |
tree | 0e68a8d2174b0ae91465ec55acf7fb0fa6ef44b3 | |
parent | c23b2ac7e65bf04239fe3f2d390d67fc98b7b3f0 (diff) |
QmlDesigner: Do not create pixmap at component completion
Creating an item pixmap will render the entire scene and clear all
dirty flags, so we don't ever want to render just one item without
checking if other items need rendering, too. So pixmap creation is
removed from completeComponent(). Since completeComponent()
already inserts the completed instances to the dirty instance set,
this should not cause any problems; it just defers the rendering to
the next collectItemChangesAndSendChangeCommands() call.
Fixes: QDS-5271
Change-Id: Ic15dbb29f13875b966f4e3c3556a4ecd7194cdd6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.cpp index 1d110098ff..6fe0807d01 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5rendernodeinstanceserver.cpp @@ -184,18 +184,14 @@ void Qt5RenderNodeInstanceServer::completeComponent(const CompleteComponentComma { Qt5NodeInstanceServer::completeComponent(command); - QList<ServerNodeInstance> instanceList; - foreach (qint32 instanceId, command.instances()) { + const QVector<qint32> ids = command.instances(); + for (qint32 instanceId : ids) { if (hasInstanceForId(instanceId)) { ServerNodeInstance instance = instanceForId(instanceId); - if (instance.isValid()) { - instanceList.append(instance); + if (instance.isValid()) m_dirtyInstanceSet.insert(instance); - } } } - - nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand(instanceList)); } void QmlDesigner::Qt5RenderNodeInstanceServer::removeSharedMemory(const QmlDesigner::RemoveSharedMemoryCommand &command) |