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>
This commit is contained in:
Miikka Heikkinen
2021-10-22 17:36:26 +03:00
parent c23b2ac7e6
commit f0d0ce4c01
@@ -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)