From b63922fa9e3990f9d414d434e73dbb7fec27ec30 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 11 Apr 2017 13:42:42 +0300 Subject: [PATCH] Show for user translated curve name in tool dialog and the property browser. --HG-- branch : release --- src/app/valentina/core/vtooloptionspropertybrowser.cpp | 10 +++++----- src/libs/vtools/dialogs/tools/dialogcubicbezier.cpp | 6 +++--- .../vtools/dialogs/tools/dialogcubicbezierpath.cpp | 6 +++--- src/libs/vtools/dialogs/tools/dialogspline.cpp | 8 ++++---- src/libs/vtools/dialogs/tools/dialogsplinepath.cpp | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/app/valentina/core/vtooloptionspropertybrowser.cpp b/src/app/valentina/core/vtooloptionspropertybrowser.cpp index 9425b87cd..8211b299a 100644 --- a/src/app/valentina/core/vtooloptionspropertybrowser.cpp +++ b/src/app/valentina/core/vtooloptionspropertybrowser.cpp @@ -516,7 +516,7 @@ void VToolOptionsPropertyBrowser::AddPropertyObjectName(Tool *i, const QString & { auto itemName = new VPE::VStringProperty(propertyName); itemName->setClearButtonEnable(true); - itemName->setValue(i->name()); + itemName->setValue(qApp->TrVars()->VarToUser(i->name())); itemName->setReadOnly(readOnly); AddProperty(itemName, AttrName); } @@ -2875,7 +2875,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolSpline() auto i = qgraphicsitem_cast(currentItem); const VSpline spl = i->getSpline(); - idToProperty[AttrName]->setValue(i->name()); + idToProperty[AttrName]->setValue(qApp->TrVars()->VarToUser(i->name())); VFormula angle1F(spl.GetStartAngleFormula(), i->getData()); angle1F.setCheckZero(false); @@ -2918,7 +2918,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolCubicBezier() { auto i = qgraphicsitem_cast(currentItem); - idToProperty[AttrName]->setValue(i->name()); + idToProperty[AttrName]->setValue(qApp->TrVars()->VarToUser(i->name())); idToProperty[AttrColor]->setValue(VPE::VLineColorProperty::IndexOfColor(VAbstractTool::ColorsList(), i->GetLineColor())); @@ -2944,7 +2944,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolSplinePath() { auto i = qgraphicsitem_cast(currentItem); - idToProperty[AttrName]->setValue(i->name()); + idToProperty[AttrName]->setValue(qApp->TrVars()->VarToUser(i->name())); idToProperty[AttrColor]->setValue(VPE::VLineColorProperty::IndexOfColor(VAbstractTool::ColorsList(), i->GetLineColor())); } @@ -2954,7 +2954,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolCubicBezierPath() { auto i = qgraphicsitem_cast(currentItem); - idToProperty[AttrName]->setValue(i->name()); + idToProperty[AttrName]->setValue(qApp->TrVars()->VarToUser(i->name())); idToProperty[AttrColor]->setValue(VPE::VLineColorProperty::IndexOfColor(VAbstractTool::ColorsList(), i->GetLineColor())); } diff --git a/src/libs/vtools/dialogs/tools/dialogcubicbezier.cpp b/src/libs/vtools/dialogs/tools/dialogcubicbezier.cpp index 8463a661b..a0d13de14 100644 --- a/src/libs/vtools/dialogs/tools/dialogcubicbezier.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcubicbezier.cpp @@ -94,7 +94,7 @@ void DialogCubicBezier::SetSpline(const VCubicBezier &spline) setCurrentPointId(ui->comboBoxP3, spl.GetP3().id()); setCurrentPointId(ui->comboBoxP4, spl.GetP4().id()); - ui->lineEditSplineName->setText(spl.name()); + ui->lineEditSplineName->setText(qApp->TrVars()->VarToUser(spl.name())); auto path = qobject_cast(vis); SCASSERT(path != nullptr) @@ -195,7 +195,7 @@ void DialogCubicBezier::PointNameChanged() getCurrentObjectId(ui->comboBoxP4) == spl.GetP4().id()) { newDuplicate = -1; - ui->lineEditSplineName->setText(spl.name()); + ui->lineEditSplineName->setText(qApp->TrVars()->VarToUser(spl.name())); } else { @@ -206,7 +206,7 @@ void DialogCubicBezier::PointNameChanged() newDuplicate = static_cast(DNumber(spline.name())); spline.SetDuplicate(static_cast(newDuplicate)); } - ui->lineEditSplineName->setText(spline.name()); + ui->lineEditSplineName->setText(qApp->TrVars()->VarToUser(spline.name())); } } ChangeColor(ui->labelName, color); diff --git a/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp b/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp index 678658224..1973009e3 100644 --- a/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp @@ -101,7 +101,7 @@ void DialogCubicBezierPath::SetPath(const VCubicBezierPath &value) NewItem(path.at(i)); } ui->listWidget->setFocus(Qt::OtherFocusReason); - ui->lineEditSplPathName->setText(path.name()); + ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(path.name())); auto visPath = qobject_cast(vis); SCASSERT(visPath != nullptr) @@ -242,7 +242,7 @@ void DialogCubicBezierPath::currentPointChanged(int index) if (first.id() == path.at(0).id() && last.id() == path.at(path.CountPoints()-1).id()) { newDuplicate = -1; - ui->lineEditSplPathName->setText(path.name()); + ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(path.name())); } else { @@ -254,7 +254,7 @@ void DialogCubicBezierPath::currentPointChanged(int index) newPath.SetDuplicate(static_cast(newDuplicate)); } - ui->lineEditSplPathName->setText(newPath.name()); + ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(newPath.name())); } } ChangeColor(ui->labelName, color); diff --git a/src/libs/vtools/dialogs/tools/dialogspline.cpp b/src/libs/vtools/dialogs/tools/dialogspline.cpp index ae768eb09..6b8f4bedc 100644 --- a/src/libs/vtools/dialogs/tools/dialogspline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogspline.cpp @@ -493,7 +493,7 @@ void DialogSpline::PointNameChanged() getCurrentObjectId(ui->comboBoxP4) == spl.GetP4().id()) { newDuplicate = -1; - ui->lineEditSplineName->setText(spl.name()); + ui->lineEditSplineName->setText(qApp->TrVars()->VarToUser(spl.name())); } else { @@ -505,7 +505,7 @@ void DialogSpline::PointNameChanged() newDuplicate = static_cast(DNumber(spline.name())); spline.SetDuplicate(static_cast(newDuplicate)); } - ui->lineEditSplineName->setText(spline.name()); + ui->lineEditSplineName->setText(qApp->TrVars()->VarToUser(spline.name())); } } ChangeColor(ui->labelName, color); @@ -541,7 +541,7 @@ void DialogSpline::ShowDialog(bool click) spl.SetDuplicate(DNumber(spl.name())); } - ui->lineEditSplineName->setText(spl.name()); + ui->lineEditSplineName->setText(qApp->TrVars()->VarToUser(spl.name())); DialogAccepted(); } @@ -594,7 +594,7 @@ void DialogSpline::SetSpline(const VSpline &spline) ui->plainTextEditLength1F->setPlainText(length1F); ui->plainTextEditLength2F->setPlainText(length2F); - ui->lineEditSplineName->setText(spl.name()); + ui->lineEditSplineName->setText(qApp->TrVars()->VarToUser(spl.name())); auto path = qobject_cast(vis); SCASSERT(path != nullptr) diff --git a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp index a7aa4baa1..3e4f273c2 100644 --- a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp @@ -158,7 +158,7 @@ void DialogSplinePath::SetPath(const VSplinePath &value) NewItem(path.at(i)); } ui->listWidget->setFocus(Qt::OtherFocusReason); - ui->lineEditSplPathName->setText(path.name()); + ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(path.name())); auto visPath = qobject_cast(vis); SCASSERT(visPath != nullptr) @@ -700,7 +700,7 @@ void DialogSplinePath::currentPointChanged(int index) if (first.P().id() == path.at(0).P().id() && last.P().id() == path.at(path.CountPoints()-1).P().id()) { newDuplicate = -1; - ui->lineEditSplPathName->setText(path.name()); + ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(path.name())); } else { @@ -712,7 +712,7 @@ void DialogSplinePath::currentPointChanged(int index) newPath.SetDuplicate(static_cast(newDuplicate)); } - ui->lineEditSplPathName->setText(newPath.name()); + ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(newPath.name())); } } ChangeColor(ui->labelName, color);