diff --git a/src/app/dialogs/app/configpages/configurationpage.cpp b/src/app/dialogs/app/configpages/configurationpage.cpp index e8617ddeb..2a90dd244 100644 --- a/src/app/dialogs/app/configpages/configurationpage.cpp +++ b/src/app/dialogs/app/configpages/configurationpage.cpp @@ -92,7 +92,7 @@ void ConfigurationPage::Apply() QString unit = qvariant_cast(this->unitCombo->itemData(this->unitCombo->currentIndex())); settings.setValue("configuration/unit", unit); this->unitChanged = false; - QString text = QString(tr("Default unit updated and will be used the next pattern load")); + QString text = QString(tr("Default unit updated and will be used the next pattern creation")); QMessageBox::information(this, QApplication::applicationName(), text); } } diff --git a/src/app/dialogs/app/dialogindividualmeasurements.cpp b/src/app/dialogs/app/dialogindividualmeasurements.cpp index abad62366..b9a7ee734 100644 --- a/src/app/dialogs/app/dialogindividualmeasurements.cpp +++ b/src/app/dialogs/app/dialogindividualmeasurements.cpp @@ -248,6 +248,18 @@ void DialogIndividualMeasurements::NewTable() //--------------------------------------------------------------------------------------------------------------------- void DialogIndividualMeasurements::InitUnits() { - ui->comboBoxUnits->addItem(tr("centimeter"), QVariant(VDomDocument::UnitsToStr(Unit::Cm))); - ui->comboBoxUnits->addItem(tr("inch"), QVariant(VDomDocument::UnitsToStr(Unit::Inch))); + QSettings settings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(), + QApplication::applicationName()); + + 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))); + + const QString checkedUnit = settings.value("configuration/unit", "cm").toString(); + // set default unit + const qint32 indexUnit = ui->comboBoxUnits->findData(checkedUnit); + if (indexUnit != -1) + { + ui->comboBoxUnits->setCurrentIndex(indexUnit); + } }