Commit a8703020 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner: set opacity to 0 instead of isVisible to false in DnD

You cannot animate from visible true to false, but you can animate
from opacity:  0.0 to 1.0 so using opacity would be better.

Task-number: BAUHAUS-672
parent e5264b1c
......@@ -127,8 +127,8 @@ QmlItemNode QmlModelView::createQmlItemNodeFromImage(const QString &imageName, c
newNode.setId(id);
if (!currentState().isBaseState()) {
newNode.modelNode().variantProperty("visible") = false;
newNode.setVariantProperty("visible", true);
newNode.modelNode().variantProperty("opacity") = 0;
newNode.setVariantProperty("opacity", 1);
}
Q_ASSERT(newNode.isValid());
......@@ -180,8 +180,8 @@ QmlItemNode QmlModelView::createQmlItemNode(const ItemLibraryEntry &itemLibraryE
}
if (!currentState().isBaseState()) {
newNode.modelNode().variantProperty("visible") = false;
newNode.setVariantProperty("visible", true);
newNode.modelNode().variantProperty("opacity") = 0;
newNode.setVariantProperty("opacity", 1);
}
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