diff --git a/ChangeLog.txt b/ChangeLog.txt index b2fbaaf24..e4ee7affb 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -2,6 +2,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 c50144a9b..bae6a000e 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -1284,7 +1284,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) { @@ -1470,7 +1470,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 @@ -2216,7 +2216,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) { @@ -2372,7 +2372,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 a459061d5..cf974be30 100644 --- a/src/app/valentina/dialogs/dialogincrements.cpp +++ b/src/app/valentina/dialogs/dialogincrements.cpp @@ -145,7 +145,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) { @@ -771,7 +771,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 8d28c3aa4..2157c214d 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 fdbc344fe..145ed6a05 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(); @@ -803,7 +802,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 522138e45..d718ad91c 100644 --- a/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp +++ b/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp @@ -323,7 +323,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 594fcc597..ec5255c4a 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 dcca134e2..abd6270a9 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 2ba6e799e..3af1309da 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 aab72ee38..ca6e31e31 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 f85aed521..a97b93167 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 23aa6786f..f50cbdf40 100644 --- a/src/libs/vtools/dialogs/tools/dialogcutarc.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcutarc.cpp @@ -198,7 +198,7 @@ void DialogCutArc::SetChildrenId(const quint32 &ch1, const quint32 &ch2) */ 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 d833a5da4..fe0e40143 100644 --- a/src/libs/vtools/dialogs/tools/dialogcutspline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcutspline.cpp @@ -97,7 +97,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 b786a4e93..d1401f651 100644 --- a/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp @@ -97,7 +97,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 34cc897c7..904dd8f98 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 fd235f887..de6d8a50f 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 b1f15ec99..642f0d3f6 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 179e5c71e..a6bc181a2 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 915f3ec07..333aab79a 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 827602ef6..57ddd9b6e 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/dialogshoulderpoint.cpp b/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp index 71196d001..03fee6872 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/tools/drawTools/toolcurve/vtoolarc.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp index 6508afcf9..51b2b5871 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp @@ -356,9 +356,9 @@ void VToolArc::SetVisualization() const VTranslateVars *trVars = qApp->TrVars(); visual->setPoint1Id(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 9f23961e9..6f8c2beea 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp @@ -312,9 +312,9 @@ void VToolArcWithLength::SetVisualization() const VTranslateVars *trVars = qApp->TrVars(); visual->setPoint1Id(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 d77f17e50..6e2fd807e 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp @@ -242,7 +242,7 @@ void VToolCutArc::SetVisualization() SCASSERT(visual != nullptr); visual->setPoint1Id(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 aa547566f..55254b7c6 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp @@ -250,7 +250,7 @@ void VToolCutSpline::SetVisualization() SCASSERT(visual != nullptr); visual->setPoint1Id(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 8cdb34d6b..cf1f829c4 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp @@ -294,7 +294,7 @@ void VToolCutSplinePath::SetVisualization() SCASSERT(visual != nullptr); visual->setPoint1Id(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 a85ff9e73..819748a07 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->setPoint1Id(basePointId); visual->setPoint2Id(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 ea29546fc..ba4d4d4d6 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp @@ -308,7 +308,7 @@ void VToolBisector::SetVisualization() visual->setPoint1Id(firstPointId); visual->setPoint2Id(basePointId); visual->setPoint3Id(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 7fd0239d1..5162a1824 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp @@ -280,7 +280,7 @@ void VToolCurveIntersectAxis::SetVisualization() visual->setPoint1Id(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 9ae71332a..7b23f2a36 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp @@ -241,8 +241,8 @@ void VToolEndLine::SetVisualization() SCASSERT(visual != nullptr); visual->setPoint1Id(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 67c9f72a0..1fa85be6f 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp @@ -295,7 +295,7 @@ void VToolLineIntersectAxis::SetVisualization() visual->setPoint1Id(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 55de6ab09..dc1cb132f 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp @@ -282,7 +282,7 @@ void VToolNormal::SetVisualization() visual->setPoint1Id(basePointId); visual->setPoint2Id(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 14bd4d749..01863736c 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp @@ -312,7 +312,7 @@ void VToolShoulderPoint::SetVisualization() visual->setPoint1Id(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 05c0086e8..d95416908 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp @@ -325,7 +325,7 @@ void VToolPointOfContact::SetVisualization() visual->setPoint1Id(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/test/ValentinaTest/tst_measurementregexp.cpp b/src/test/ValentinaTest/tst_measurementregexp.cpp index 535bfc61f..95df1af29 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(); } }