|
|
|
@ -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()) { |
|
|
|
|
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()) |
|
|
|
|
{ |
|
|
|
|
QGraphicsItem* item = itAdded.next(); |
|
|
|
|
if( !itms.contains(item) && !(item->parentItem() && UBGraphicsGroupContainerItem::Type == item->parentItem()->type())) |
|
|
|
|
itms.insert(item); |
|
|
|
|
if (!items.contains(item) && |
|
|
|
|
!(item->parentItem() && UBGraphicsGroupContainerItem::Type == item->parentItem()->type()) && |
|
|
|
|
!items.contains(item->parentItem()) |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
items.insert(item); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QSetIterator<QGraphicsItem*> itRemoved(cmd->GetRemovedList()); |
|
|
|
|
while (itRemoved.hasNext()) |
|
|
|
|
{ |
|
|
|
|
QGraphicsItem* item = itRemoved.next(); |
|
|
|
|
if( !itms.contains(item) && !(item->parentItem() && UBGraphicsGroupContainerItem::Type == item->parentItem()->type())) |
|
|
|
|
itms.insert(item); |
|
|
|
|
if (!items.contains(item) && |
|
|
|
|
!(item->parentItem() && UBGraphicsGroupContainerItem::Type == item->parentItem()->type()) && |
|
|
|
|
!items.contains(item->parentItem()) |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
items.insert(item); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|