Invalid name of arc in modeling mode. Closes smart-pattern/valentina#40.

This commit is contained in:
Roman Telezhynskyi 2020-06-02 18:11:52 +03:00
parent 8d68cde576
commit c263060fd0
3 changed files with 12 additions and 3 deletions

View File

@ -49,6 +49,7 @@
- [smart-pattern/valentina#15] Organization of groups - groups categories - [smart-pattern/valentina#15] Organization of groups - groups categories
- Improve the property browser. Show full arc name. - Improve the property browser. Show full arc name.
- [smart-pattern/valentina#45] Optimize tool box position for big screen resolutions. - [smart-pattern/valentina#45] Optimize tool box position for big screen resolutions.
- [smart-pattern/valentina#40] Invalid name of arc in modeling mode.
# Version 0.6.2 (unreleased) # Version 0.6.2 (unreleased)
- [#903] Bug in tool Cut Spline path. - [#903] Bug in tool Cut Spline path.

View File

@ -379,7 +379,11 @@ void VArc::CreateName()
{ {
QString name = ARC_ + QString("%1").arg(this->GetCenter().name()); QString name = ARC_ + QString("%1").arg(this->GetCenter().name());
if (VAbstractCurve::id() != NULL_ID) if (getMode() == Draw::Modeling && getIdObject() != NULL_ID)
{
name += QString("_%1").arg(getIdObject());
}
else if (VAbstractCurve::id() != NULL_ID)
{ {
name += QString("_%1").arg(VAbstractCurve::id()); name += QString("_%1").arg(VAbstractCurve::id());
} }

View File

@ -381,7 +381,11 @@ void VEllipticalArc::CreateName()
{ {
QString name = ELARC_ + QString("%1").arg(this->GetCenter().name()); QString name = ELARC_ + QString("%1").arg(this->GetCenter().name());
if (VAbstractCurve::id() != NULL_ID) if (getMode() == Draw::Modeling && getIdObject() != NULL_ID)
{
name += QString("_%1").arg(getIdObject());
}
else if (VAbstractCurve::id() != NULL_ID)
{ {
name += QString("_%1").arg(VAbstractCurve::id()); name += QString("_%1").arg(VAbstractCurve::id());
} }