Translate path node names.
--HG-- branch : feature
This commit is contained in:
parent
fc86069f7c
commit
79a1caa4d7
|
@ -449,13 +449,19 @@ QString DialogTool::DialogWarningIcon()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QString DialogTool::GetNodeName(const VPieceNode &node) const
|
QString DialogTool::GetNodeName(const VPieceNode &node) const
|
||||||
{
|
{
|
||||||
const QSharedPointer<VGObject> obj = data->GeometricObject<VGObject>(node.GetId());
|
const QSharedPointer<VGObject> obj = data->GetGObject(node.GetId());
|
||||||
QString name = obj->name();
|
QString name = obj->name();
|
||||||
|
|
||||||
if (node.GetTypeTool() != Tool::NodePoint && node.GetReverse())
|
if (node.GetTypeTool() != Tool::NodePoint)
|
||||||
|
{
|
||||||
|
int bias = 0;
|
||||||
|
qApp->TrVars()->VariablesToUser(name, 0, obj->name(), bias);
|
||||||
|
|
||||||
|
if (node.GetReverse())
|
||||||
{
|
{
|
||||||
name = QLatin1String("- ") + name;
|
name = QLatin1String("- ") + name;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
@ -473,10 +479,8 @@ void DialogTool::NewNodeItem(QListWidget *listWidget, const VPieceNode &node)
|
||||||
case (Tool::NodeElArc):
|
case (Tool::NodeElArc):
|
||||||
case (Tool::NodeSpline):
|
case (Tool::NodeSpline):
|
||||||
case (Tool::NodeSplinePath):
|
case (Tool::NodeSplinePath):
|
||||||
{
|
|
||||||
name = GetNodeName(node);
|
name = GetNodeName(node);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
qDebug()<<"Got wrong tools. Ignore.";
|
qDebug()<<"Got wrong tools. Ignore.";
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user