Commit 0071c80a authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Fix non updating of scene matrix if parent transform changed



Task-number: QTCREATORBUG-10644
Change-Id: Ib112352e539fde4eefb8c029080c688bed8a0ebd
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 00cbee48
......@@ -108,6 +108,24 @@ bool Qt5InformationNodeInstanceServer::isDirtyRecursiveForNonInstanceItems(QQuic
return false;
}
bool Qt5InformationNodeInstanceServer::isDirtyRecursiveForParentInstances(QQuickItem *item) const
{
if (DesignerSupport::isDirty(item, DesignerSupport::TransformUpdateMask))
return true;
QQuickItem *parentItem = item->parentItem();
if (parentItem) {
if (hasInstanceForObject(parentItem) && DesignerSupport::isDirty(parentItem, DesignerSupport::TransformUpdateMask))
return true;
return isDirtyRecursiveForParentInstances(parentItem);
}
return false;
}
void Qt5InformationNodeInstanceServer::collectItemChangesAndSendChangeCommands()
{
static bool inFunction = false;
......@@ -126,7 +144,8 @@ void Qt5InformationNodeInstanceServer::collectItemChangesAndSendChangeCommands()
if (isDirtyRecursiveForNonInstanceItems(item))
informationChangedInstanceSet.insert(instance);
else if (isDirtyRecursiveForParentInstances(item))
informationChangedInstanceSet.insert(instance);
if (DesignerSupport::isDirty(item, DesignerSupport::ParentChanged)) {
m_parentChangedSet.insert(instance);
......
......@@ -53,6 +53,7 @@ protected:
void sendChildrenChangedCommand(const QList<ServerNodeInstance> childList);
void sendTokenBack();
bool isDirtyRecursiveForNonInstanceItems(QQuickItem *item) const;
bool isDirtyRecursiveForParentInstances(QQuickItem *item) const;
private:
QSet<ServerNodeInstance> m_parentChangedSet;
......
Supports Markdown
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