diff --git a/src/app/dialogs/app/dialogindividualmeasurements.cpp b/src/app/dialogs/app/dialogindividualmeasurements.cpp index a03e7b7f9..f6dbb698e 100644 --- a/src/app/dialogs/app/dialogindividualmeasurements.cpp +++ b/src/app/dialogs/app/dialogindividualmeasurements.cpp @@ -248,7 +248,7 @@ void DialogIndividualMeasurements::InitUnits() { ui->comboBoxUnits->addItem(tr("Centimeters"), QVariant(VDomDocument::UnitsToStr(Unit::Cm))); ui->comboBoxUnits->addItem(tr("Milimiters"), QVariant(VDomDocument::UnitsToStr(Unit::Mm))); - ui->comboBoxUnits->addItem(tr("Inches"), QVariant(VDomDocument::UnitsToStr(Unit::Inch, true))); + ui->comboBoxUnits->addItem(tr("Inches"), QVariant(VDomDocument::UnitsToStr(Unit::Inch))); const QString checkedUnit = qApp->getSettings()->value("configuration/unit", "cm").toString(); // set default unit diff --git a/src/app/mainwindow.cpp b/src/app/mainwindow.cpp index a8e64756f..e347ab04f 100644 --- a/src/app/mainwindow.cpp +++ b/src/app/mainwindow.cpp @@ -196,8 +196,7 @@ void MainWindow::ActionNewPP() pattern->ClearGObjects(); //Create single point - const quint32 id = pattern->AddGObject(new VPointF(qApp->toPixel((10+comboBoxDraws->count()*5)), qApp->toPixel(10), - "А", 5, 10)); + const quint32 id = pattern->AddGObject(new VPointF(20+comboBoxDraws->count()*5, 20, "А", 5, 10)); VToolSinglePoint *spoint = new VToolSinglePoint(doc, pattern, id, Source::FromGui, patternPieceName, path); sceneDraw->addItem(spoint); connect(spoint, &VToolPoint::ChoosedTool, sceneDraw, &VMainGraphicsScene::ChoosedItem); diff --git a/src/app/xml/vdomdocument.cpp b/src/app/xml/vdomdocument.cpp index f0c92c3a4..8019623e0 100644 --- a/src/app/xml/vdomdocument.cpp +++ b/src/app/xml/vdomdocument.cpp @@ -427,7 +427,7 @@ QString VDomDocument::UnitsToStr(const Unit &unit, const bool translate) } else { - result = "mm"; + result = UnitMM; } break; case Unit::Cm: @@ -437,17 +437,17 @@ QString VDomDocument::UnitsToStr(const Unit &unit, const bool translate) } else { - result = "cm"; + result = UnitCM; } break; case Unit::Inch: if (translate) { - result = QObject::tr("in", "inch abbreviation"); + result = QObject::tr("inch"); } else { - result = "inch";//I decided use full name in xml file. + result = UnitINCH; } break; default: @@ -457,7 +457,7 @@ QString VDomDocument::UnitsToStr(const Unit &unit, const bool translate) } else { - result = "cm"; + result = UnitCM; } break; }