Commit 05c1e792 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner.NodeInstances: Fix rendering of child items of components

Change-Id: I96d888bb97e334ff9a2a8fa3e8c2bcb931b247c1
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 8542c063
......@@ -80,10 +80,15 @@ void Qt5RenderNodeInstanceServer::collectItemChangesAndSendChangeCommands()
if (quickView() && nodeInstanceClient()->bytesToWrite() < 10000) {
foreach (QQuickItem *item, allItems()) {
if (item && hasInstanceForObject(item)) {
ServerNodeInstance instance = instanceForObject(item);
if (DesignerSupport::isDirty(item, DesignerSupport::ContentUpdateMask))
m_dirtyInstanceSet.insert(instance);
if (item) {
if (hasInstanceForObject(item)
&& DesignerSupport::isDirty(item, DesignerSupport::ContentUpdateMask)) {
m_dirtyInstanceSet.insert(instanceForObject(item));
} else if (DesignerSupport::isDirty(item, DesignerSupport::AllMask)) {
ServerNodeInstance ancestorInstance = findNodeInstanceForItem(item->parentItem());
if (ancestorInstance.isValid())
m_dirtyInstanceSet.insert(ancestorInstance);
}
}
}
......@@ -105,6 +110,18 @@ void Qt5RenderNodeInstanceServer::collectItemChangesAndSendChangeCommands()
}
}
ServerNodeInstance Qt5RenderNodeInstanceServer::findNodeInstanceForItem(QQuickItem *item) const
{
if (item) {
if (hasInstanceForObject(item))
return instanceForObject(item);
else if (item->parentItem())
return findNodeInstanceForItem(item->parentItem());
}
return ServerNodeInstance();
}
void Qt5RenderNodeInstanceServer::createScene(const CreateSceneCommand &command)
{
......
......@@ -47,6 +47,7 @@ public:
protected:
void collectItemChangesAndSendChangeCommands();
ServerNodeInstance findNodeInstanceForItem(QQuickItem *item) const;
private:
QSet<ServerNodeInstance> m_dirtyInstanceSet;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment