Fixed pen strokes' zLevels not being saved to file (Issue #12)

preferencesAboutTextFull
Craig Watson 9 years ago
parent 3c44bfb94a
commit 4d74341c68
  1. 2
      src/adaptors/UBSvgSubsetAdaptor.cpp
  2. 4
      src/domain/UBGraphicsScene.cpp
  3. 1
      src/domain/UBGraphicsStrokesGroup.cpp

@ -1111,7 +1111,7 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex)
if (colorOnDarkBackground.isValid() && colorOnLightBackground.isValid())
{
mXmlWriter.writeAttribute(UBSettings::uniboardDocumentNamespaceUri, "z-value"
, QString("%1").arg(polygonItem->zValue()));
, QString("%1").arg(polygonItem->strokesGroup()->zValue()));
mXmlWriter.writeAttribute(UBSettings::uniboardDocumentNamespaceUri
, "fill-on-dark-background", colorOnDarkBackground.name());

@ -262,6 +262,10 @@ qreal UBZLayerController::changeZLevelTo(QGraphicsItem *item, moveDestination de
}
//Return new z value assigned to item
// experimental
item->setZValue(item->data(UBGraphicsItemData::ItemOwnZValue).toReal());
return item->data(UBGraphicsItemData::ItemOwnZValue).toReal();
}

@ -185,6 +185,7 @@ void UBGraphicsStrokesGroup::copyItemParameters(UBItem *copy) const
cp->setFlag(QGraphicsItem::ItemIsSelectable, true);
cp->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType));
cp->setData(UBGraphicsItemData::ItemLocked, this->data(UBGraphicsItemData::ItemLocked));
cp->setZValue(this->zValue());
}
}

Loading…
Cancel
Save