QmlDesigner: Don't move items in a layout

Change-Id: I9050b11d50d39726e2a19cabb7709020738a5c95
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Marco Bubke
2013-09-10 18:06:27 +02:00
parent 820223a8f5
commit bd9cf4bc87
@@ -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)
{
if (oldParentInstance && oldParentInstance->isPositioner()) {
if (oldParentInstance && oldParentInstance->isLayoutable()) {
setInLayoutable(false);
setMovable(true);
}
ObjectNodeInstance::reparent(oldParentInstance, oldParentProperty, newParentInstance, newParentProperty);
if (newParentInstance && newParentInstance->isPositioner()) {
if (newParentInstance && newParentInstance->isLayoutable()) {
setInLayoutable(true);
setMovable(false);
}
if (oldParentInstance && oldParentInstance->isPositioner() && !(newParentInstance && newParentInstance->isPositioner())) {
if (oldParentInstance && oldParentInstance->isLayoutable() && !(newParentInstance && newParentInstance->isLayoutable())) {
if (!hasBindingForProperty("x"))
setPropertyVariant("x", x());