diff --git a/ChangeLog.txt b/ChangeLog.txt index e124a13e0..a629bc7b1 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -29,6 +29,7 @@ - [#435] Valentina doesn't change the cursor. - [#473] Tape 'Preferences' cause loss of focus. - [#485] Error when drawing a curved path. +- [#491] Valentina doesn't update fractional separator. # Version 0.4.4 April 12, 2016 - Updated measurement templates with all measurements. Added new template Aldrich/Women measurements. diff --git a/src/app/tape/mapplication.cpp b/src/app/tape/mapplication.cpp index e52acc0f7..3598b3c9c 100644 --- a/src/app/tape/mapplication.cpp +++ b/src/app/tape/mapplication.cpp @@ -410,7 +410,7 @@ void MApplication::InitTrVars() } else { - trVars = new VTranslateVars(TapeSettings()->GetOsSeparator()); + trVars = new VTranslateVars(); } } diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index b66ff66b5..9f223babf 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -1292,7 +1292,7 @@ void TMainWindow::ShowMData() QString formula; try { - formula = qApp->TrVars()->FormulaToUser(meash->GetFormula()); + formula = qApp->TrVars()->FormulaToUser(meash->GetFormula(), qApp->Settings()->GetOsSeparator()); } catch (qmu::QmuParserError &e) { @@ -1478,7 +1478,7 @@ void TMainWindow::SaveMValue() try { - const QString formula = qApp->TrVars()->FormulaFromUser(text, true); + const QString formula = qApp->TrVars()->FormulaFromUser(text, qApp->Settings()->GetOsSeparator()); m->SetMValue(nameField->data(Qt::UserRole).toString(), formula); } catch (qmu::QmuParserError &e) // Just in case something bad will happen @@ -2254,7 +2254,7 @@ void TMainWindow::RefreshTable() QString formula; try { - formula = qApp->TrVars()->FormulaToUser(meash->GetFormula()); + formula = qApp->TrVars()->FormulaToUser(meash->GetFormula(), qApp->Settings()->GetOsSeparator()); } catch (qmu::QmuParserError &e) { @@ -2410,7 +2410,7 @@ bool TMainWindow::EvalFormula(const QString &formula, bool fromUser, VContainer QString f; if (fromUser) { - f = qApp->TrVars()->FormulaFromUser(formula, true); + f = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); } else { diff --git a/src/app/valentina/core/vapplication.cpp b/src/app/valentina/core/vapplication.cpp index 045e3bcef..f837ddc67 100644 --- a/src/app/valentina/core/vapplication.cpp +++ b/src/app/valentina/core/vapplication.cpp @@ -613,7 +613,7 @@ void VApplication::InitTrVars() { if (trVars == nullptr) { - trVars = new VTranslateVars(ValentinaSettings()->GetOsSeparator()); + trVars = new VTranslateVars(); } } diff --git a/src/app/valentina/dialogs/dialogincrements.cpp b/src/app/valentina/dialogs/dialogincrements.cpp index 724495f91..f4fe086a5 100644 --- a/src/app/valentina/dialogs/dialogincrements.cpp +++ b/src/app/valentina/dialogs/dialogincrements.cpp @@ -143,7 +143,7 @@ void DialogIncrements::FillIncrements() QString formula; try { - formula = qApp->TrVars()->FormulaToUser(incr->GetFormula()); + formula = qApp->TrVars()->FormulaToUser(incr->GetFormula(), qApp->Settings()->GetOsSeparator()); } catch (qmu::QmuParserError &e) { @@ -748,7 +748,7 @@ void DialogIncrements::ShowIncrementDetails() QString formula; try { - formula = qApp->TrVars()->FormulaToUser(incr->GetFormula()); + formula = qApp->TrVars()->FormulaToUser(incr->GetFormula(), qApp->Settings()->GetOsSeparator()); } catch (qmu::QmuParserError &e) { diff --git a/src/libs/vpatterndb/vformula.cpp b/src/libs/vpatterndb/vformula.cpp index 8e60633d2..5e06af6c1 100644 --- a/src/libs/vpatterndb/vformula.cpp +++ b/src/libs/vpatterndb/vformula.cpp @@ -43,8 +43,14 @@ VFormula::VFormula() //--------------------------------------------------------------------------------------------------------------------- VFormula::VFormula(const QString &formula, const VContainer *container) - :formula(qApp->TrVars()->FormulaToUser(formula)), value(QString(tr("Error"))), checkZero(true), data(container), - toolId(NULL_ID), postfix(QString()), _error(true), dValue(0) + : formula(qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->GetOsSeparator())), + value(QString(tr("Error"))), + checkZero(true), + data(container), + toolId(NULL_ID), + postfix(QString()), + _error(true), + dValue(0) { this->formula.replace("\n", " ");// Replace line return with spaces for calc if exist Eval(); @@ -114,7 +120,7 @@ void VFormula::SetFormula(const QString &value, FormulaType type) { if (type == FormulaType::ToUser) { - formula = qApp->TrVars()->FormulaToUser(value); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); } else { diff --git a/src/libs/vpatterndb/vtranslatevars.cpp b/src/libs/vpatterndb/vtranslatevars.cpp index 858a32d77..a2274b857 100644 --- a/src/libs/vpatterndb/vtranslatevars.cpp +++ b/src/libs/vpatterndb/vtranslatevars.cpp @@ -40,7 +40,7 @@ using namespace qmu; //--------------------------------------------------------------------------------------------------------------------- -VTranslateVars::VTranslateVars(bool osSeparator) +VTranslateVars::VTranslateVars() :VTranslateMeasurements(), PMSystemNames(QMap()), PMSystemAuthors(QMap()), @@ -48,8 +48,7 @@ VTranslateVars::VTranslateVars(bool osSeparator) variables(QMap()), functions(QMap()), postfixOperators(QMap()), - stDescriptions(QMap()), - osSeparator(osSeparator) + stDescriptions(QMap()) { InitPatternMakingSystems(); InitVariables(); @@ -804,7 +803,7 @@ QString VTranslateVars::TryFormulaFromUser(const QString &formula, bool osSepara * @param formula expression that need translate * @return translated expression */ -QString VTranslateVars::FormulaToUser(const QString &formula) const +QString VTranslateVars::FormulaToUser(const QString &formula, bool osSeparator) const { if (formula.isEmpty()) { diff --git a/src/libs/vpatterndb/vtranslatevars.h b/src/libs/vpatterndb/vtranslatevars.h index 178377748..079d1ae50 100644 --- a/src/libs/vpatterndb/vtranslatevars.h +++ b/src/libs/vpatterndb/vtranslatevars.h @@ -34,7 +34,7 @@ class VTranslateVars : public VTranslateMeasurements { public: - explicit VTranslateVars(bool osSeparator); + explicit VTranslateVars(); virtual ~VTranslateVars() Q_DECL_OVERRIDE; bool VariablesFromUser(QString &newFormula, int position, const QString &token, int &bias) const; @@ -55,7 +55,7 @@ public: QString FormulaFromUser(const QString &formula, bool osSeparator) const; QString TryFormulaFromUser(const QString &formula, bool osSeparator) const; - QString FormulaToUser(const QString &formula) const; + QString FormulaToUser(const QString &formula, bool osSeparator) const; virtual void Retranslate() Q_DECL_OVERRIDE; @@ -68,7 +68,6 @@ private: QMap functions; QMap postfixOperators; QMap stDescriptions; - bool osSeparator; void InitPatternMakingSystems(); void InitVariables(); diff --git a/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp b/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp index 7e128200d..22ea0bd69 100644 --- a/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp +++ b/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp @@ -298,7 +298,7 @@ void DialogEditWrongFormula::showEvent(QShowEvent *event) //--------------------------------------------------------------------------------------------------------------------- void DialogEditWrongFormula::SetFormula(const QString &value) { - formula = qApp->TrVars()->FormulaToUser(value); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. TODO : see if I can get the max number of caracters in one line // of this PlainTextEdit to change 80 to this value if (formula.length() > 80) diff --git a/src/libs/vtools/dialogs/tools/dialogalongline.cpp b/src/libs/vtools/dialogs/tools/dialogalongline.cpp index df24ce40b..99dfef4be 100644 --- a/src/libs/vtools/dialogs/tools/dialogalongline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogalongline.cpp @@ -250,7 +250,7 @@ void DialogAlongLine::SetFirstPointId(const quint32 &value) */ void DialogAlongLine::SetFormula(const QString &value) { - formula = qApp->TrVars()->FormulaToUser(value); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (formula.length() > 80) { diff --git a/src/libs/vtools/dialogs/tools/dialogarc.cpp b/src/libs/vtools/dialogs/tools/dialogarc.cpp index a70112f81..28b4e8e5a 100644 --- a/src/libs/vtools/dialogs/tools/dialogarc.cpp +++ b/src/libs/vtools/dialogs/tools/dialogarc.cpp @@ -135,7 +135,7 @@ void DialogArc::SetCenter(const quint32 &value) */ void DialogArc::SetF2(const QString &value) { - f2 = qApp->TrVars()->FormulaToUser(value); + f2 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (f2.length() > 80) { @@ -169,7 +169,7 @@ void DialogArc::SetColor(const QString &value) */ void DialogArc::SetF1(const QString &value) { - f1 = qApp->TrVars()->FormulaToUser(value); + f1 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (f1.length() > 80) { @@ -191,7 +191,7 @@ void DialogArc::SetF1(const QString &value) */ void DialogArc::SetRadius(const QString &value) { - radius = qApp->TrVars()->FormulaToUser(value); + radius = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (radius.length() > 80) { diff --git a/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp b/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp index 198b168c0..294aef428 100644 --- a/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp +++ b/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp @@ -116,7 +116,7 @@ QString DialogArcWithLength::GetRadius() const //--------------------------------------------------------------------------------------------------------------------- void DialogArcWithLength::SetRadius(const QString &value) { - radius = qApp->TrVars()->FormulaToUser(value); + radius = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (radius.length() > 80) { @@ -139,7 +139,7 @@ QString DialogArcWithLength::GetF1() const void DialogArcWithLength::SetF1(const QString &value) { - f1 = qApp->TrVars()->FormulaToUser(value); + f1 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (f1.length() > 80) { @@ -163,7 +163,7 @@ QString DialogArcWithLength::GetLength() const //--------------------------------------------------------------------------------------------------------------------- void DialogArcWithLength::SetLength(const QString &value) { - length = qApp->TrVars()->FormulaToUser(value); + length = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (length.length() > 80) { diff --git a/src/libs/vtools/dialogs/tools/dialogbisector.cpp b/src/libs/vtools/dialogs/tools/dialogbisector.cpp index 1ef8cba74..88b8313f0 100644 --- a/src/libs/vtools/dialogs/tools/dialogbisector.cpp +++ b/src/libs/vtools/dialogs/tools/dialogbisector.cpp @@ -237,7 +237,7 @@ void DialogBisector::SetTypeLine(const QString &value) */ void DialogBisector::SetFormula(const QString &value) { - formula = qApp->TrVars()->FormulaToUser(value); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (formula.length() > 80) { diff --git a/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp b/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp index 93401b93f..52ab4aa38 100644 --- a/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp @@ -110,7 +110,7 @@ QString DialogCurveIntersectAxis::GetAngle() const //--------------------------------------------------------------------------------------------------------------------- void DialogCurveIntersectAxis::SetAngle(const QString &value) { - formulaAngle = qApp->TrVars()->FormulaToUser(value); + formulaAngle = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. TODO : see if I can get the max number of caracters in one line // of this PlainTextEdit to change 80 to this value if (formulaAngle.length() > 80) diff --git a/src/libs/vtools/dialogs/tools/dialogcutarc.cpp b/src/libs/vtools/dialogs/tools/dialogcutarc.cpp index 936175f1a..c247013aa 100644 --- a/src/libs/vtools/dialogs/tools/dialogcutarc.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcutarc.cpp @@ -176,7 +176,7 @@ void DialogCutArc::setArcId(const quint32 &value) */ void DialogCutArc::SetFormula(const QString &value) { - formula = qApp->TrVars()->FormulaToUser(value); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (formula.length() > 80) { diff --git a/src/libs/vtools/dialogs/tools/dialogcutspline.cpp b/src/libs/vtools/dialogs/tools/dialogcutspline.cpp index 2ab83fc38..fe6f2ffc7 100644 --- a/src/libs/vtools/dialogs/tools/dialogcutspline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcutspline.cpp @@ -95,7 +95,7 @@ void DialogCutSpline::SetPointName(const QString &value) */ void DialogCutSpline::SetFormula(const QString &value) { - formula = qApp->TrVars()->FormulaToUser(value); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. TODO : see if I can get the max number of caracters in one line // of this PlainTextEdit to change 80 to this value if (formula.length() > 80) diff --git a/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp b/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp index 116ba4a24..181f958c2 100644 --- a/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp @@ -95,7 +95,7 @@ void DialogCutSplinePath::SetPointName(const QString &value) */ void DialogCutSplinePath::SetFormula(const QString &value) { - formula = qApp->TrVars()->FormulaToUser(value); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. TODO : see if I can get the max number of caracters in one line // of this PlainTextEdit to change 80 to this value if (formula.length() > 80) diff --git a/src/libs/vtools/dialogs/tools/dialogendline.cpp b/src/libs/vtools/dialogs/tools/dialogendline.cpp index c21bad7b9..e1a921897 100644 --- a/src/libs/vtools/dialogs/tools/dialogendline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogendline.cpp @@ -203,7 +203,7 @@ void DialogEndLine::SetTypeLine(const QString &value) */ void DialogEndLine::SetFormula(const QString &value) { - formulaLength = qApp->TrVars()->FormulaToUser(value); + formulaLength = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. TODO : see if I can get the max number of caracters in one line // of this PlainTextEdit to change 80 to this value if (formulaLength.length() > 80) @@ -226,7 +226,7 @@ void DialogEndLine::SetFormula(const QString &value) */ void DialogEndLine::SetAngle(const QString &value) { - formulaAngle = qApp->TrVars()->FormulaToUser(value); + formulaAngle = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. TODO : see if I can get the max number of caracters in one line // of this PlainTextEdit to change 80 to this value if (formulaAngle.length() > 80) diff --git a/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp b/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp index a2fa2faa4..a61a6e3d0 100644 --- a/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp +++ b/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp @@ -119,7 +119,7 @@ QString DialogLineIntersectAxis::GetAngle() const //--------------------------------------------------------------------------------------------------------------------- void DialogLineIntersectAxis::SetAngle(const QString &value) { - formulaAngle = qApp->TrVars()->FormulaToUser(value); + formulaAngle = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. TODO : see if I can get the max number of caracters in one line // of this PlainTextEdit to change 80 to this value if (formulaAngle.length() > 80) diff --git a/src/libs/vtools/dialogs/tools/dialognormal.cpp b/src/libs/vtools/dialogs/tools/dialognormal.cpp index be1b08099..d219318fd 100644 --- a/src/libs/vtools/dialogs/tools/dialognormal.cpp +++ b/src/libs/vtools/dialogs/tools/dialognormal.cpp @@ -268,7 +268,7 @@ void DialogNormal::SetAngle(const qreal &value) */ void DialogNormal::SetFormula(const QString &value) { - formula = qApp->TrVars()->FormulaToUser(value); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (formula.length() > 80) { diff --git a/src/libs/vtools/dialogs/tools/dialogpointfromcircleandtangent.cpp b/src/libs/vtools/dialogs/tools/dialogpointfromcircleandtangent.cpp index f7334a079..9b0d84830 100644 --- a/src/libs/vtools/dialogs/tools/dialogpointfromcircleandtangent.cpp +++ b/src/libs/vtools/dialogs/tools/dialogpointfromcircleandtangent.cpp @@ -125,7 +125,7 @@ QString DialogPointFromCircleAndTangent::GetCircleRadius() const //--------------------------------------------------------------------------------------------------------------------- void DialogPointFromCircleAndTangent::SetCircleRadius(const QString &value) { - const QString formula = qApp->TrVars()->FormulaToUser(value); + const QString formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (formula.length() > 80) { diff --git a/src/libs/vtools/dialogs/tools/dialogpointofcontact.cpp b/src/libs/vtools/dialogs/tools/dialogpointofcontact.cpp index 29da1303f..e20065ab2 100644 --- a/src/libs/vtools/dialogs/tools/dialogpointofcontact.cpp +++ b/src/libs/vtools/dialogs/tools/dialogpointofcontact.cpp @@ -277,7 +277,7 @@ void DialogPointOfContact::setCenter(const quint32 &value) */ void DialogPointOfContact::setRadius(const QString &value) { - radius = qApp->TrVars()->FormulaToUser(value); + radius = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (radius.length() > 80) { diff --git a/src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.cpp b/src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.cpp index e2822784f..90abbd364 100644 --- a/src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.cpp +++ b/src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.cpp @@ -157,7 +157,7 @@ QString DialogPointOfIntersectionCircles::GetFirstCircleRadius() const //--------------------------------------------------------------------------------------------------------------------- void DialogPointOfIntersectionCircles::SetFirstCircleRadius(const QString &value) { - const QString formula = qApp->TrVars()->FormulaToUser(value); + const QString formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (formula.length() > 80) { @@ -182,7 +182,7 @@ QString DialogPointOfIntersectionCircles::GetSecondCircleRadius() const //--------------------------------------------------------------------------------------------------------------------- void DialogPointOfIntersectionCircles::SetSecondCircleRadius(const QString &value) { - const QString formula = qApp->TrVars()->FormulaToUser(value); + const QString formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (formula.length() > 80) { diff --git a/src/libs/vtools/dialogs/tools/dialogrotation.cpp b/src/libs/vtools/dialogs/tools/dialogrotation.cpp index 381df8896..ec0c93978 100644 --- a/src/libs/vtools/dialogs/tools/dialogrotation.cpp +++ b/src/libs/vtools/dialogs/tools/dialogrotation.cpp @@ -108,7 +108,7 @@ QString DialogRotation::GetAngle() const //--------------------------------------------------------------------------------------------------------------------- void DialogRotation::SetAngle(const QString &value) { - formulaAngle = qApp->TrVars()->FormulaToUser(value); + formulaAngle = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (formulaAngle.length() > 80) { diff --git a/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp b/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp index 3ff86611b..79f4ff42b 100644 --- a/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp +++ b/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp @@ -295,7 +295,7 @@ void DialogShoulderPoint::SetP1Line(const quint32 &value) */ void DialogShoulderPoint::SetFormula(const QString &value) { - formula = qApp->TrVars()->FormulaToUser(value); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); // increase height if needed. if (formula.length() > 80) { diff --git a/src/libs/vtools/dialogs/tools/dialogspline.cpp b/src/libs/vtools/dialogs/tools/dialogspline.cpp index 2a893b92e..ffd05e80d 100644 --- a/src/libs/vtools/dialogs/tools/dialogspline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogspline.cpp @@ -273,7 +273,7 @@ void DialogSpline::FXAngle1() dialog->setPostfix(VDomDocument::UnitsToStr(qApp->patternUnit(), true)); if (dialog->exec() == QDialog::Accepted) { - angle1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula()); + angle1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); // increase height if needed. if (angle1F.length() > 80) { @@ -296,7 +296,7 @@ void DialogSpline::FXAngle2() dialog->setPostfix(VDomDocument::UnitsToStr(qApp->patternUnit(), true)); if (dialog->exec() == QDialog::Accepted) { - angle2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula()); + angle2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); // increase height if needed. if (angle2F.length() > 80) { @@ -319,7 +319,7 @@ void DialogSpline::FXLength1() dialog->setPostfix(VDomDocument::UnitsToStr(qApp->patternUnit(), true)); if (dialog->exec() == QDialog::Accepted) { - length1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula()); + length1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); // increase height if needed. if (length1F.length() > 80) { @@ -342,7 +342,7 @@ void DialogSpline::FXLength2() dialog->setPostfix(VDomDocument::UnitsToStr(qApp->patternUnit(), true)); if (dialog->exec() == QDialog::Accepted) { - length2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula()); + length2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); // increase height if needed. if (length2F.length() > 80) { @@ -505,13 +505,17 @@ void DialogSpline::ShowDialog(bool click) spl = VSpline(*GetP1(), path->GetP2(), path->GetP3(), *GetP4()); - const QString angle1F = qApp->TrVars()->FormulaToUser(spl.GetStartAngleFormula()); - const QString angle2F = qApp->TrVars()->FormulaToUser(spl.GetEndAngleFormula()); + const QString angle1F = qApp->TrVars()->FormulaToUser(spl.GetStartAngleFormula(), + qApp->Settings()->GetOsSeparator()); + const QString angle2F = qApp->TrVars()->FormulaToUser(spl.GetEndAngleFormula(), + qApp->Settings()->GetOsSeparator()); ui->plainTextEditAngle1F->setPlainText(angle1F); ui->plainTextEditAngle2F->setPlainText(angle2F); - ui->plainTextEditLength1F->setPlainText(qApp->TrVars()->FormulaToUser(spl.GetC1LengthFormula())); - ui->plainTextEditLength2F->setPlainText(qApp->TrVars()->FormulaToUser(spl.GetC2LengthFormula())); + ui->plainTextEditLength1F->setPlainText(qApp->TrVars()->FormulaToUser(spl.GetC1LengthFormula(), + qApp->Settings()->GetOsSeparator())); + ui->plainTextEditLength2F->setPlainText(qApp->TrVars()->FormulaToUser(spl.GetC2LengthFormula(), + qApp->Settings()->GetOsSeparator())); if (not data->IsUnique(spl.name())) { @@ -556,14 +560,18 @@ void DialogSpline::SetSpline(const VSpline &spline) setCurrentPointId(ui->comboBoxP1, spl.GetP1().id()); setCurrentPointId(ui->comboBoxP4, spl.GetP4().id()); - const QString angle1F = qApp->TrVars()->FormulaToUser(spl.GetStartAngleFormula()); - const QString angle2F = qApp->TrVars()->FormulaToUser(spl.GetEndAngleFormula()); + const QString angle1F = qApp->TrVars()->FormulaToUser(spl.GetStartAngleFormula(), + qApp->Settings()->GetOsSeparator()); + const QString angle2F = qApp->TrVars()->FormulaToUser(spl.GetEndAngleFormula(), + qApp->Settings()->GetOsSeparator()); ui->plainTextEditAngle1F->setPlainText(angle1F); ui->plainTextEditAngle2F->setPlainText(angle2F); - const QString length1F = qApp->TrVars()->FormulaToUser(spl.GetC1LengthFormula()); - const QString length2F = qApp->TrVars()->FormulaToUser(spl.GetC2LengthFormula()); + const QString length1F = qApp->TrVars()->FormulaToUser(spl.GetC1LengthFormula(), + qApp->Settings()->GetOsSeparator()); + const QString length2F = qApp->TrVars()->FormulaToUser(spl.GetC2LengthFormula(), + qApp->Settings()->GetOsSeparator()); ui->plainTextEditLength1F->setPlainText(length1F); ui->plainTextEditLength2F->setPlainText(length2F); diff --git a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp index 1a4771378..338f00ce6 100644 --- a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp @@ -301,7 +301,8 @@ void DialogSplinePath::Angle1Changed() if (row != ui->listWidget->count()-1) { ui->plainTextEditAngle2F->blockSignals(true); - ui->plainTextEditAngle2F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle2Formula())); + ui->plainTextEditAngle2F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle2Formula(), + qApp->Settings()->GetOsSeparator())); EvalAngle2(); ui->plainTextEditAngle2F->blockSignals(false); } @@ -343,7 +344,8 @@ void DialogSplinePath::Angle2Changed() if (row != 0) { ui->plainTextEditAngle1F->blockSignals(true); - ui->plainTextEditAngle1F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle1Formula())); + ui->plainTextEditAngle1F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle1Formula(), + qApp->Settings()->GetOsSeparator())); EvalAngle1(); ui->plainTextEditAngle1F->blockSignals(false); } @@ -431,7 +433,7 @@ void DialogSplinePath::FXAngle1() dialog->setPostfix(VDomDocument::UnitsToStr(qApp->patternUnit(), true)); if (dialog->exec() == QDialog::Accepted) { - angle1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula()); + angle1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); // increase height if needed. if (angle1F.length() > 80) { @@ -456,7 +458,7 @@ void DialogSplinePath::FXAngle2() dialog->setPostfix(VDomDocument::UnitsToStr(qApp->patternUnit(), true)); if (dialog->exec() == QDialog::Accepted) { - angle2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula()); + angle2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); // increase height if needed. if (angle2F.length() > 80) { @@ -481,7 +483,7 @@ void DialogSplinePath::FXLength1() dialog->setPostfix(VDomDocument::UnitsToStr(qApp->patternUnit(), true)); if (dialog->exec() == QDialog::Accepted) { - length1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula()); + length1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); // increase height if needed. if (length1F.length() > 80) { @@ -506,7 +508,7 @@ void DialogSplinePath::FXLength2() dialog->setPostfix(VDomDocument::UnitsToStr(qApp->patternUnit(), true)); if (dialog->exec() == QDialog::Accepted) { - length2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula()); + length2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); // increase height if needed. if (length2F.length() > 80) { @@ -790,9 +792,11 @@ void DialogSplinePath::DataPoint(const VSplinePoint &p) ui->plainTextEditAngle2F->blockSignals(true); ui->plainTextEditLength2F->blockSignals(true); - ui->plainTextEditAngle2F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle2Formula())); + ui->plainTextEditAngle2F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle2Formula(), + qApp->Settings()->GetOsSeparator())); EvalAngle2(); - ui->plainTextEditLength2F->setPlainText(qApp->TrVars()->FormulaToUser(p.Length2Formula())); + ui->plainTextEditLength2F->setPlainText(qApp->TrVars()->FormulaToUser(p.Length2Formula(), + qApp->Settings()->GetOsSeparator())); EvalLength2(); ui->plainTextEditAngle2F->blockSignals(false); ui->plainTextEditLength2F->blockSignals(false); @@ -825,9 +829,11 @@ void DialogSplinePath::DataPoint(const VSplinePoint &p) ui->plainTextEditAngle1F->blockSignals(true); ui->plainTextEditLength1F->blockSignals(true); - ui->plainTextEditAngle1F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle1Formula())); + ui->plainTextEditAngle1F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle1Formula(), + qApp->Settings()->GetOsSeparator())); EvalAngle1(); - ui->plainTextEditLength1F->setPlainText(qApp->TrVars()->FormulaToUser(p.Length1Formula())); + ui->plainTextEditLength1F->setPlainText(qApp->TrVars()->FormulaToUser(p.Length1Formula(), + qApp->Settings()->GetOsSeparator())); EvalLength1(); ui->plainTextEditAngle1F->blockSignals(false); ui->plainTextEditLength1F->blockSignals(false); @@ -849,10 +855,14 @@ void DialogSplinePath::DataPoint(const VSplinePoint &p) ui->plainTextEditAngle2F->blockSignals(true); ui->plainTextEditLength2F->blockSignals(true); - ui->plainTextEditAngle1F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle1Formula())); - ui->plainTextEditAngle2F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle2Formula())); - ui->plainTextEditLength1F->setPlainText(qApp->TrVars()->FormulaToUser(p.Length1Formula())); - ui->plainTextEditLength2F->setPlainText(qApp->TrVars()->FormulaToUser(p.Length2Formula())); + ui->plainTextEditAngle1F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle1Formula(), + qApp->Settings()->GetOsSeparator())); + ui->plainTextEditAngle2F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle2Formula(), + qApp->Settings()->GetOsSeparator())); + ui->plainTextEditLength1F->setPlainText(qApp->TrVars()->FormulaToUser(p.Length1Formula(), + qApp->Settings()->GetOsSeparator())); + ui->plainTextEditLength2F->setPlainText(qApp->TrVars()->FormulaToUser(p.Length2Formula(), + qApp->Settings()->GetOsSeparator())); EvalAngle1(); EvalLength1(); diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp index 043c41b04..162f1cb04 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp @@ -647,7 +647,7 @@ void VToolRotation::SetVisualization() visual->SetObjects(source); visual->SetOriginPointId(origPointId); - visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle)); + visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle, qApp->Settings()->GetOsSeparator())); visual->RefreshGeometry(); } } diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp index 11b059691..bdf23acc2 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp @@ -350,9 +350,9 @@ void VToolArc::SetVisualization() const VTranslateVars *trVars = qApp->TrVars(); visual->setObject1Id(arc->GetCenter().id()); - visual->setRadius(trVars->FormulaToUser(arc->GetFormulaRadius())); - visual->setF1(trVars->FormulaToUser(arc->GetFormulaF1())); - visual->setF2(trVars->FormulaToUser(arc->GetFormulaF2())); + visual->setRadius(trVars->FormulaToUser(arc->GetFormulaRadius(), qApp->Settings()->GetOsSeparator())); + visual->setF1(trVars->FormulaToUser(arc->GetFormulaF1(), qApp->Settings()->GetOsSeparator())); + visual->setF2(trVars->FormulaToUser(arc->GetFormulaF2(), qApp->Settings()->GetOsSeparator())); visual->RefreshGeometry(); } } diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp index a57d12830..757706536 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp @@ -307,9 +307,9 @@ void VToolArcWithLength::SetVisualization() const VTranslateVars *trVars = qApp->TrVars(); visual->setObject1Id(arc->GetCenter().id()); - visual->setRadius(trVars->FormulaToUser(arc->GetFormulaRadius())); - visual->setF1(trVars->FormulaToUser(arc->GetFormulaF1())); - visual->setLength(trVars->FormulaToUser(arc->GetFormulaLength())); + visual->setRadius(trVars->FormulaToUser(arc->GetFormulaRadius(), qApp->Settings()->GetOsSeparator())); + visual->setF1(trVars->FormulaToUser(arc->GetFormulaF1(), qApp->Settings()->GetOsSeparator())); + visual->setLength(trVars->FormulaToUser(arc->GetFormulaLength(), qApp->Settings()->GetOsSeparator())); visual->RefreshGeometry(); } } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp index b01ce84ec..ab4bda056 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp @@ -224,7 +224,7 @@ void VToolCutArc::SetVisualization() SCASSERT(visual != nullptr); visual->setObject1Id(curveCutId); - visual->setLength(qApp->TrVars()->FormulaToUser(formula)); + visual->setLength(qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->GetOsSeparator())); visual->RefreshGeometry(); } } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp index 4bcea1f65..a3b755e22 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp @@ -222,7 +222,7 @@ void VToolCutSpline::SetVisualization() SCASSERT(visual != nullptr); visual->setObject1Id(curveCutId); - visual->setLength(qApp->TrVars()->FormulaToUser(formula)); + visual->setLength(qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->GetOsSeparator())); visual->RefreshGeometry(); } } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp index df8264140..463debfb0 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp @@ -307,7 +307,7 @@ void VToolCutSplinePath::SetVisualization() SCASSERT(visual != nullptr); visual->setObject1Id(curveCutId); - visual->setLength(qApp->TrVars()->FormulaToUser(formula)); + visual->setLength(qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->GetOsSeparator())); visual->RefreshGeometry(); } } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp index 833008fd6..2fbca8c73 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp @@ -146,7 +146,7 @@ void VToolAlongLine::SetVisualization() SCASSERT(visual != nullptr) visual->setObject1Id(basePointId); visual->setObject2Id(secondPointId); - visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength)); + visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->GetOsSeparator())); visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine)); visual->RefreshGeometry(); } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp index 4b59d8370..dd0c2d6c0 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp @@ -304,7 +304,7 @@ void VToolBisector::SetVisualization() visual->setObject1Id(firstPointId); visual->setObject2Id(basePointId); visual->setObject3Id(thirdPointId); - visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength)); + visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->GetOsSeparator())); visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine)); visual->RefreshGeometry(); } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp index b49796c49..fb6c5c6c0 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp @@ -292,7 +292,7 @@ void VToolCurveIntersectAxis::SetVisualization() visual->setObject1Id(curveId); visual->setAxisPointId(basePointId); - visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle)); + visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle, qApp->Settings()->GetOsSeparator())); visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine)); visual->RefreshGeometry(); } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp index ae4efa2ff..d993bdc20 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp @@ -238,8 +238,8 @@ void VToolEndLine::SetVisualization() SCASSERT(visual != nullptr); visual->setObject1Id(basePointId); - visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength)); - visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle)); + visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->GetOsSeparator())); + visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle, qApp->Settings()->GetOsSeparator())); visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine)); visual->RefreshGeometry(); } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp index 8ecaa8e2e..802e3bc92 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp @@ -292,7 +292,7 @@ void VToolLineIntersectAxis::SetVisualization() visual->setObject1Id(firstPointId); visual->setPoint2Id(secondPointId); visual->setAxisPointId(basePointId); - visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle)); + visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle, qApp->Settings()->GetOsSeparator())); visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine)); visual->RefreshGeometry(); } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp index ebfb1f85f..2250ca5ae 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp @@ -278,7 +278,7 @@ void VToolNormal::SetVisualization() visual->setObject1Id(basePointId); visual->setObject2Id(secondPointId); - visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength)); + visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->GetOsSeparator())); visual->SetAngle(angle); visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine)); visual->RefreshGeometry(); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp index 391574918..edae92ae4 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp @@ -308,7 +308,7 @@ void VToolShoulderPoint::SetVisualization() visual->setObject1Id(pShoulder); visual->setLineP1Id(basePointId); visual->setLineP2Id(p2Line); - visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength)); + visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->GetOsSeparator())); visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine)); visual->RefreshGeometry(); } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp index 533f34522..7e92b8021 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp @@ -321,7 +321,7 @@ void VToolPointOfContact::SetVisualization() visual->setObject1Id(firstPointId); visual->setLineP2Id(secondPointId); visual->setRadiusId(center); - visual->setRadius(qApp->TrVars()->FormulaToUser(arcRadius)); + visual->setRadius(qApp->TrVars()->FormulaToUser(arcRadius, qApp->Settings()->GetOsSeparator())); visual->RefreshGeometry(); } } diff --git a/src/libs/vtools/visualization/line/vistoolendline.cpp b/src/libs/vtools/visualization/line/vistoolendline.cpp index fcc7a87aa..0365ab7cc 100644 --- a/src/libs/vtools/visualization/line/vistoolendline.cpp +++ b/src/libs/vtools/visualization/line/vistoolendline.cpp @@ -73,7 +73,8 @@ void VisToolEndLine::RefreshGeometry() Visualization::toolTip = QString(tr("Point at distance and angle: angle = %1°, length = %2%3; " "Shift - sticking angle, Enter - finish creation")) .arg(this->line().angle()) - .arg(qApp->TrVars()->FormulaToUser(QString::number(qApp->fromPixel(this->line().length())))) + .arg(qApp->TrVars()->FormulaToUser(QString::number(qApp->fromPixel(this->line().length())), + qApp->Settings()->GetOsSeparator())) .arg(prefix); } diff --git a/src/test/ValentinaTest/tst_measurementregexp.cpp b/src/test/ValentinaTest/tst_measurementregexp.cpp index 9da3ed8df..44ba83479 100644 --- a/src/test/ValentinaTest/tst_measurementregexp.cpp +++ b/src/test/ValentinaTest/tst_measurementregexp.cpp @@ -568,7 +568,7 @@ void TST_MeasurementRegExp::InitTrMs() } else { - trMs = new VTranslateVars(true); + trMs = new VTranslateVars(); } }