Fixed saving/loading of grouped items' transforms

(Much simpler and cleaner solution than previous commit)
preferencesAboutTextFull
Craig Watson 8 years ago
parent b213b2d82d
commit f2786221c3
  1. 4
      src/domain/UBGraphicsScene.cpp

@ -1178,8 +1178,6 @@ UBGraphicsScene* UBGraphicsScene::sceneDeepCopy() const
UBGraphicsGroupContainerItem* groupCloned = group->deepCopyNoChildDuplication(); UBGraphicsGroupContainerItem* groupCloned = group->deepCopyNoChildDuplication();
groupCloned->resetMatrix(); groupCloned->resetMatrix();
groupCloned->resetTransform(); groupCloned->resetTransform();
groupCloned->setMatrix(group->matrix());
groupCloned->setTransform(group->transform());
bool locked = groupCloned->Delegate()->isLocked(); bool locked = groupCloned->Delegate()->isLocked();
foreach(QGraphicsItem* eachItem ,group->childItems()){ foreach(QGraphicsItem* eachItem ,group->childItems()){
@ -1192,6 +1190,8 @@ UBGraphicsScene* UBGraphicsScene::sceneDeepCopy() const
groupCloned->setData(UBGraphicsItemData::ItemLocked, QVariant(true)); groupCloned->setData(UBGraphicsItemData::ItemLocked, QVariant(true));
copy->addItem(groupCloned); copy->addItem(groupCloned);
groupCloned->setMatrix(group->matrix());
groupCloned->setTransform(group->transform());
} }
if (ubItem && !stroke && !group && item->isVisible()) if (ubItem && !stroke && !group && item->isVisible())

Loading…
Cancel
Save