Commit f0a6a0ab authored by Marco Bubke's avatar Marco Bubke Committed by Kai Koehne
Browse files

Do reparenting only with the control modifier hold

The isContainer flag is now ignored.

Reviewed-by: kkoehne
parent a41876cd
......@@ -148,7 +148,7 @@ FormEditorItem* ItemCreatorTool::calculateContainer(const QPointF &point)
QList<QGraphicsItem *> list = scene()->items(point);
foreach (QGraphicsItem *item, list) {
FormEditorItem *formEditorItem = FormEditorItem::fromQGraphicsItem(item);
if (formEditorItem && formEditorItem->isContainer())
if (formEditorItem)
return formEditorItem;
}
return 0;
......
......@@ -90,12 +90,12 @@ void MoveTool::mouseMoveEvent(const QList<QGraphicsItem*> &itemList,
m_resizeIndicator.hide();
FormEditorItem *containerItem = containerFormEditorItem(itemList, m_movingItems);
if (containerItem &&
containerItem != m_movingItems.first()->parentItem() &&
view()->currentState().isBaseState() &&
!event->modifiers().testFlag(Qt::ShiftModifier)) {
m_moveManipulator.reparentTo(containerItem);
if (containerItem
&& view()->currentState().isBaseState()) {
if (containerItem != m_movingItems.first()->parentItem()
&& event->modifiers().testFlag(Qt::ShiftModifier)) {
m_moveManipulator.reparentTo(containerItem);
}
}
bool shouldSnapping = view()->widget()->snappingAction()->isChecked();
......@@ -313,9 +313,7 @@ FormEditorItem* MoveTool::containerFormEditorItem(const QList<QGraphicsItem*> &i
if (formEditorItem
&& !selectedItemList.contains(formEditorItem)
&& isNotAncestorOfItemInList(formEditorItem, selectedItemList))
if (formEditorItem->isContainer()) {
return formEditorItem;
}
}
......
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