|
|
@ -143,13 +143,13 @@ QColor UBGraphicsPolygonItem::color() const |
|
|
|
|
|
|
|
|
|
|
|
UBItem* UBGraphicsPolygonItem::deepCopy() const |
|
|
|
UBItem* UBGraphicsPolygonItem::deepCopy() const |
|
|
|
{
|
|
|
|
{
|
|
|
|
UBGraphicsPolygonItem* copy = new UBGraphicsPolygonItem(polygon(), parentItem()); |
|
|
|
UBGraphicsPolygonItem* copy = new UBGraphicsPolygonItem(polygon(), 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UBGraphicsStroke *stroke = new UBGraphicsStroke(); |
|
|
|
|
|
|
|
|
|
|
|
copyItemParameters(copy); |
|
|
|
copyItemParameters(copy); |
|
|
|
|
|
|
|
|
|
|
|
copy->mOriginalLine = this->mOriginalLine; |
|
|
|
copy->setStroke(stroke); |
|
|
|
copy->mOriginalWidth = this->mOriginalWidth; |
|
|
|
|
|
|
|
copy->mIsNominalLine = this->mIsNominalLine; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return copy; |
|
|
|
return copy; |
|
|
|
} |
|
|
|
} |
|
|
@ -160,17 +160,15 @@ void UBGraphicsPolygonItem::copyItemParameters(UBItem *copy) const |
|
|
|
UBGraphicsPolygonItem *cp = dynamic_cast<UBGraphicsPolygonItem*>(copy); |
|
|
|
UBGraphicsPolygonItem *cp = dynamic_cast<UBGraphicsPolygonItem*>(copy); |
|
|
|
if (cp) |
|
|
|
if (cp) |
|
|
|
{ |
|
|
|
{ |
|
|
|
cp->mOriginalLine = QLineF(); |
|
|
|
cp->mOriginalLine = this->mOriginalLine; |
|
|
|
cp->mOriginalWidth = -1; |
|
|
|
cp->mOriginalWidth = this->mOriginalWidth; |
|
|
|
cp->mIsNominalLine = false; |
|
|
|
cp->mIsNominalLine = this->mIsNominalLine; |
|
|
|
|
|
|
|
|
|
|
|
cp->setStroke(this->stroke()); |
|
|
|
cp->setTransform(transform()); |
|
|
|
cp->setStrokesGroup(this->strokesGroup()); |
|
|
|
|
|
|
|
cp->setBrush(this->brush()); |
|
|
|
cp->setBrush(this->brush()); |
|
|
|
cp->setPen(this->pen()); |
|
|
|
cp->setPen(this->pen()); |
|
|
|
cp->mHasAlpha = this->mHasAlpha; |
|
|
|
cp->mHasAlpha = this->mHasAlpha; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cp->setColorOnDarkBackground(this->colorOnDarkBackground()); |
|
|
|
cp->setColorOnDarkBackground(this->colorOnDarkBackground()); |
|
|
|
cp->setColorOnLightBackground(this->colorOnLightBackground()); |
|
|
|
cp->setColorOnLightBackground(this->colorOnLightBackground()); |
|
|
|
|
|
|
|
|
|
|
|