Do reparenting only with the control modifier hold

The isContainer flag is now ignored.

Reviewed-by: kkoehne
This commit is contained in:
Marco Bubke
2010-05-26 18:05:49 +02:00
committed by Kai Koehne
parent a41876cd41
commit f0a6a0abb8
2 changed files with 7 additions and 9 deletions

View File

@@ -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;
}
}