Commit 67522011 authored by Craig Watson's avatar Craig Watson

Fixed saving of all graphicsItems' zValues

Simply added copying of zValue to the deep copy functions. As tested on
OSX, this does pose any problems when duplicating an item on-page (i.e
generating a new item with a zValue equal to its original).
parent 4d74341c
......@@ -275,6 +275,8 @@ void UBGraphicsMediaItem::copyItemParameters(UBItem *copy) const
cp->setSourceUrl(this->sourceUrl());
cp->resize(this->size());
cp->setZValue(this->zValue());
connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), cp, SLOT(activeSceneChanged()));
// TODO UB 4.7 complete all members
}
......
......@@ -122,6 +122,7 @@ void UBGraphicsPDFItem::copyItemParameters(UBItem *copy) const
cp->setFlag(QGraphicsItem::ItemIsSelectable, true);
cp->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType));
cp->setSourceUrl(this->sourceUrl());
cp->setZValue(this->zValue());
}
}
......
......@@ -156,6 +156,8 @@ void UBGraphicsPixmapItem::copyItemParameters(UBItem *copy) const
cp->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType));
cp->setData(UBGraphicsItemData::ItemLocked, this->data(UBGraphicsItemData::ItemLocked));
cp->setSourceUrl(this->sourceUrl());
cp->setZValue(this->zValue());
}
}
......
......@@ -180,6 +180,7 @@ void UBGraphicsSvgItem::copyItemParameters(UBItem *copy) const
cp->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType));
cp->setData(UBGraphicsItemData::ItemLocked, this->data(UBGraphicsItemData::ItemLocked));
cp->setSourceUrl(this->sourceUrl());
cp->setZValue(this->zValue());
}
}
......
......@@ -280,6 +280,7 @@ void UBGraphicsTextItem::copyItemParameters(UBItem *copy) const
cp->setTextHeight(this->textHeight());
cp->setSourceUrl(this->sourceUrl());
cp->setZValue(this->zValue());
}
}
......
......@@ -744,6 +744,7 @@ void UBGraphicsAppleWidgetItem::copyItemParameters(UBItem *copy) const
}
cp->setSourceUrl(this->sourceUrl());
cp->setZValue(this->zValue());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment