Fix name for history with alias.

This commit is contained in:
Roman Telezhynskyi 2020-11-04 14:50:17 +02:00
parent a5f65c319c
commit 38e60d5905
3 changed files with 25 additions and 3 deletions

View File

@ -182,7 +182,14 @@ QString VAbstractArc::NameForHistory(const QString &toolName) const
name += QString("_%1").arg(GetDuplicate());
}
return not GetAlias().isEmpty() ? QString("%1 (%2)").arg(GetAlias(), name) : name;
QString alias;
if (not GetAliasSuffix().isEmpty())
{
alias = QString("%1 %2").arg(toolName, GetAliasSuffix());
}
return not alias.isEmpty() ? QString("%1 (%2)").arg(alias, name) : name;
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -476,7 +476,14 @@ QString VAbstractCubicBezier::NameForHistory(const QString &toolName) const
name += QString("_%1").arg(GetDuplicate());
}
return not GetAlias().isEmpty() ? QString("%1 (%2)").arg(GetAlias(), name) : name;
QString alias;
if (not GetAliasSuffix().isEmpty())
{
alias = QString("%1 %2").arg(toolName, GetAliasSuffix());
}
return not alias.isEmpty() ? QString("%1 (%2)").arg(alias, name) : name;
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -265,7 +265,15 @@ QString VAbstractCubicBezierPath::NameForHistory(const QString &toolName) const
name += QString("_%1").arg(GetDuplicate());
}
}
return name;
QString alias;
if (not GetAliasSuffix().isEmpty())
{
alias = QString("%1 %2").arg(toolName, GetAliasSuffix());
}
return not alias.isEmpty() ? QString("%1 (%2)").arg(alias, name) : name;
}
//---------------------------------------------------------------------------------------------------------------------