Fix for grouped items' locked state not being saved

preferencesAboutTextFull
Craig Watson 8 years ago
parent 427379a2eb
commit 71287f6228
  1. 5
      src/domain/UBGraphicsScene.cpp

@ -1180,12 +1180,17 @@ UBGraphicsScene* UBGraphicsScene::sceneDeepCopy() const
groupCloned->resetTransform();
groupCloned->setMatrix(group->matrix());
groupCloned->setTransform(group->transform());
bool locked = groupCloned->Delegate()->isLocked();
foreach(QGraphicsItem* eachItem ,group->childItems()){
QGraphicsItem* copiedChild = dynamic_cast<QGraphicsItem*>(dynamic_cast<UBItem*>(eachItem)->deepCopy());
copy->addItem(copiedChild);
groupCloned->addToGroup(copiedChild);
}
if (locked)
groupCloned->setData(UBGraphicsItemData::ItemLocked, QVariant(true));
copy->addItem(groupCloned);
}

Loading…
Cancel
Save