fixed an issue where duplicated grouped items were losing zlevel order

preferencesAboutTextFull
Clément Fauconnier 6 years ago
parent 1a425b015d
commit 0cccd34024
  1. 7
      src/board/UBBoardController.cpp

@ -694,12 +694,17 @@ UBGraphicsItem *UBBoardController::duplicateItem(UBItem *item)
mActiveScene->setURStackEnable(false);
foreach(QGraphicsItem* pIt, children){
UBItem* pItem = dynamic_cast<UBItem*>(pIt);
if(pItem){
if(pItem)
{
QGraphicsItem * itemToGroup = dynamic_cast<QGraphicsItem *>(duplicateItem(pItem));
if (itemToGroup)
{
itemToGroup->setZValue(pIt->zValue());
itemToGroup->setData(UBGraphicsItemData::ItemOwnZValue, pIt->data(UBGraphicsItemData::ItemOwnZValue).toReal());
duplicatedItems.append(itemToGroup);
}
}
}
duplicatedGroup = mActiveScene->createGroup(duplicatedItems);
duplicatedGroup->setTransform(groupItem->transform());
groupItem->setSelected(false);

Loading…
Cancel
Save