Commit bd9cf4bc authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Don't move items in a layout



Change-Id: I9050b11d50d39726e2a19cabb7709020738a5c95
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 820223a8
...@@ -188,19 +188,19 @@ void QuickItemNodeInstance::setResizable(bool resizable) ...@@ -188,19 +188,19 @@ void QuickItemNodeInstance::setResizable(bool resizable)
void QuickItemNodeInstance::reparent(const ObjectNodeInstance::Pointer &oldParentInstance, const PropertyName &oldParentProperty, const ObjectNodeInstance::Pointer &newParentInstance, const PropertyName &newParentProperty) void QuickItemNodeInstance::reparent(const ObjectNodeInstance::Pointer &oldParentInstance, const PropertyName &oldParentProperty, const ObjectNodeInstance::Pointer &newParentInstance, const PropertyName &newParentProperty)
{ {
if (oldParentInstance && oldParentInstance->isPositioner()) { if (oldParentInstance && oldParentInstance->isLayoutable()) {
setInLayoutable(false); setInLayoutable(false);
setMovable(true); setMovable(true);
} }
ObjectNodeInstance::reparent(oldParentInstance, oldParentProperty, newParentInstance, newParentProperty); ObjectNodeInstance::reparent(oldParentInstance, oldParentProperty, newParentInstance, newParentProperty);
if (newParentInstance && newParentInstance->isPositioner()) { if (newParentInstance && newParentInstance->isLayoutable()) {
setInLayoutable(true); setInLayoutable(true);
setMovable(false); setMovable(false);
} }
if (oldParentInstance && oldParentInstance->isPositioner() && !(newParentInstance && newParentInstance->isPositioner())) { if (oldParentInstance && oldParentInstance->isLayoutable() && !(newParentInstance && newParentInstance->isLayoutable())) {
if (!hasBindingForProperty("x")) if (!hasBindingForProperty("x"))
setPropertyVariant("x", x()); setPropertyVariant("x", x());
......
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