Commit 893020ae authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: We should test if untracked items are dirty too

Change-Id: I94db08fff3e7e38a9cc377d06a5aabc6d886b64e
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent cec82a13
......@@ -86,6 +86,26 @@ void Qt5InformationNodeInstanceServer::token(const TokenCommand &command)
startRenderTimer();
}
bool Qt5InformationNodeInstanceServer::isDirtyRecursiveForNonInstanceItems(QQuickItem *item) const
{
static DesignerSupport::DirtyType informationsDirty = DesignerSupport::DirtyType(DesignerSupport::TransformUpdateMask
| DesignerSupport::ContentUpdateMask
| DesignerSupport::Visible
| DesignerSupport::ZValue
| DesignerSupport::OpacityValue);
if (DesignerSupport::isDirty(item, informationsDirty))
return true;
foreach (QQuickItem *childItem, item->childItems()) {
if (!hasInstanceForObject(childItem) && DesignerSupport::isDirty(childItem, informationsDirty))
return true;
}
return false;
}
void Qt5InformationNodeInstanceServer::collectItemChangesAndSendChangeCommands()
{
static bool inFunction = false;
......@@ -103,12 +123,7 @@ void Qt5InformationNodeInstanceServer::collectItemChangesAndSendChangeCommands()
if (item && hasInstanceForObject(item)) {
ServerNodeInstance instance = instanceForObject(item);
DesignerSupport::DirtyType informationsDirty = DesignerSupport::DirtyType(DesignerSupport::TransformUpdateMask
| DesignerSupport::ContentUpdateMask
| DesignerSupport::Visible
| DesignerSupport::ZValue
| DesignerSupport::OpacityValue);
if (DesignerSupport::isDirty(item, informationsDirty))
if (isDirtyRecursiveForNonInstanceItems(item))
informationChangedInstanceSet.insert(instance);
......
......@@ -52,7 +52,7 @@ protected:
void collectItemChangesAndSendChangeCommands() Q_DECL_OVERRIDE;
void sendChildrenChangedCommand(const QList<ServerNodeInstance> childList);
void sendTokenBack();
bool isDirtyRecursiveForNonInstanceItems(QQuickItem *item) const;
private:
QSet<ServerNodeInstance> m_parentChangedSet;
......
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