Commit 8e53076c authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.QmlModelView: Item creation in states

If an item is created in a state it is only visible in that state
by default
See: Bauhaus-600
parent 9e47fd9e
......@@ -120,6 +120,10 @@ QmlItemNode QmlModelView::createQmlItemNodeFromImage(const QString &imageName, c
} while (hasId(id)); //If the name already exists count upwards
newNode.setId(id);
if (!currentState().isBaseState()) {
newNode.modelNode().variantProperty("visible") = false;
newNode.setVariantProperty("visible", true);
}
Q_ASSERT(newNode.isValid());
}
......@@ -162,6 +166,10 @@ QmlItemNode QmlModelView::createQmlItemNode(const ItemLibraryInfo &itemLibraryRe
} while (hasId(id)); //If the name already exists count upwards
newNode.setId(id);
if (!currentState().isBaseState()) {
newNode.modelNode().variantProperty("visible") = false;
newNode.setVariantProperty("visible", true);
}
Q_ASSERT(newNode.isValid());
}
......
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