Merge with develop

--HG--
branch : feature
This commit is contained in:
dismine 2014-08-07 17:49:09 +03:00
commit 6d5b6bed54
3 changed files with 7 additions and 8 deletions

View File

@ -248,7 +248,7 @@ void DialogIndividualMeasurements::InitUnits()
{ {
ui->comboBoxUnits->addItem(tr("Centimeters"), QVariant(VDomDocument::UnitsToStr(Unit::Cm))); ui->comboBoxUnits->addItem(tr("Centimeters"), QVariant(VDomDocument::UnitsToStr(Unit::Cm)));
ui->comboBoxUnits->addItem(tr("Milimiters"), QVariant(VDomDocument::UnitsToStr(Unit::Mm))); 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(); const QString checkedUnit = qApp->getSettings()->value("configuration/unit", "cm").toString();
// set default unit // set default unit

View File

@ -196,8 +196,7 @@ void MainWindow::ActionNewPP()
pattern->ClearGObjects(); pattern->ClearGObjects();
//Create single point //Create single point
const quint32 id = pattern->AddGObject(new VPointF(qApp->toPixel((10+comboBoxDraws->count()*5)), qApp->toPixel(10), const quint32 id = pattern->AddGObject(new VPointF(20+comboBoxDraws->count()*5, 20, "А", 5, 10));
"А", 5, 10));
VToolSinglePoint *spoint = new VToolSinglePoint(doc, pattern, id, Source::FromGui, patternPieceName, path); VToolSinglePoint *spoint = new VToolSinglePoint(doc, pattern, id, Source::FromGui, patternPieceName, path);
sceneDraw->addItem(spoint); sceneDraw->addItem(spoint);
connect(spoint, &VToolPoint::ChoosedTool, sceneDraw, &VMainGraphicsScene::ChoosedItem); connect(spoint, &VToolPoint::ChoosedTool, sceneDraw, &VMainGraphicsScene::ChoosedItem);

View File

@ -466,7 +466,7 @@ QString VDomDocument::UnitsToStr(const Unit &unit, const bool translate)
} }
else else
{ {
result = "mm"; result = UnitMM;
} }
break; break;
case Unit::Cm: case Unit::Cm:
@ -476,17 +476,17 @@ QString VDomDocument::UnitsToStr(const Unit &unit, const bool translate)
} }
else else
{ {
result = "cm"; result = UnitCM;
} }
break; break;
case Unit::Inch: case Unit::Inch:
if (translate) if (translate)
{ {
result = QObject::tr("in", "inch abbreviation"); result = QObject::tr("inch");
} }
else else
{ {
result = "inch";//I decided use full name in xml file. result = UnitINCH;
} }
break; break;
default: default:
@ -496,7 +496,7 @@ QString VDomDocument::UnitsToStr(const Unit &unit, const bool translate)
} }
else else
{ {
result = "cm"; result = UnitCM;
} }
break; break;
} }