|
|
@ -1632,11 +1632,11 @@ void UBBoardController::moveSceneToIndex(int source, int target) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBBoardController::findUniquesItems(const QUndoCommand *parent, QSet<QGraphicsItem*> &itms) |
|
|
|
void UBBoardController::findUniquesItems(const QUndoCommand *parent, QSet<QGraphicsItem*> &items) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (parent->childCount()) { |
|
|
|
if (parent->childCount()) { |
|
|
|
for (int i = 0; i < parent->childCount(); i++) { |
|
|
|
for (int i = 0; i < parent->childCount(); i++) { |
|
|
|
findUniquesItems(parent->child(i), itms); |
|
|
|
findUniquesItems(parent->child(i), items); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1657,16 +1657,26 @@ void UBBoardController::findUniquesItems(const QUndoCommand *parent, QSet<QGraph |
|
|
|
while (itAdded.hasNext()) |
|
|
|
while (itAdded.hasNext()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QGraphicsItem* item = itAdded.next(); |
|
|
|
QGraphicsItem* item = itAdded.next(); |
|
|
|
if( !itms.contains(item) && !(item->parentItem() && UBGraphicsGroupContainerItem::Type == item->parentItem()->type())) |
|
|
|
if (!items.contains(item) && |
|
|
|
itms.insert(item); |
|
|
|
!(item->parentItem() && UBGraphicsGroupContainerItem::Type == item->parentItem()->type()) && |
|
|
|
|
|
|
|
!items.contains(item->parentItem()) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
items.insert(item); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
QSetIterator<QGraphicsItem*> itRemoved(cmd->GetRemovedList()); |
|
|
|
QSetIterator<QGraphicsItem*> itRemoved(cmd->GetRemovedList()); |
|
|
|
while (itRemoved.hasNext()) |
|
|
|
while (itRemoved.hasNext()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QGraphicsItem* item = itRemoved.next(); |
|
|
|
QGraphicsItem* item = itRemoved.next(); |
|
|
|
if( !itms.contains(item) && !(item->parentItem() && UBGraphicsGroupContainerItem::Type == item->parentItem()->type())) |
|
|
|
if (!items.contains(item) && |
|
|
|
itms.insert(item); |
|
|
|
!(item->parentItem() && UBGraphicsGroupContainerItem::Type == item->parentItem()->type()) && |
|
|
|
|
|
|
|
!items.contains(item->parentItem()) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
items.insert(item); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|