fixed deep copy

preferencesAboutTextFull
Claudio Valerio 11 years ago
parent fc87cb062a
commit 03edf4f575
  1. 9
      src/domain/UBGraphicsPolygonItem.cpp

@ -174,14 +174,10 @@ QColor UBGraphicsPolygonItem::color() const
UBItem* UBGraphicsPolygonItem::deepCopy() const
{
UBGraphicsPolygonItem* copy = new UBGraphicsPolygonItem(polygon(), 0);
UBGraphicsStroke *stroke = new UBGraphicsStroke();
// UBGraphicsPolygonItem* copy = new UBGraphicsPolygonItem(polygon(), 0);
UBGraphicsPolygonItem* copy = new UBGraphicsPolygonItem();
copyItemParameters(copy);
copy->setStroke(stroke);
return copy;
}
@ -204,6 +200,7 @@ void UBGraphicsPolygonItem::copyItemParameters(UBItem *copy) const
cp->setColorOnLightBackground(this->colorOnLightBackground());
cp->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType));
cp->setPolygon(polygon());
}
}

Loading…
Cancel
Save