We need do set decimals before we set value

--HG--
branch : feature
This commit is contained in:
Valentina Zhuravska 2015-11-29 16:42:39 +02:00
parent cd15fd711e
commit f91fbaaa01

View File

@ -52,12 +52,12 @@ DialogDetail::DialogDetail(const VContainer *data, const quint32 &toolId, QWidge
ui.labelUnitX->setText(VDomDocument::UnitsToStr(qApp->patternUnit(), true));
ui.labelUnitY->setText(VDomDocument::UnitsToStr(qApp->patternUnit(), true));
// Default value for seam allowence is 1 cm. But pattern have different units, so just set 1 in dialog not enough.
ui.doubleSpinBoxSeams->setValue(UnitConvertor(1, Unit::Cm, qApp->patternUnit()));
if(qApp->patternUnit() == Unit::Inch)
{
ui.doubleSpinBoxSeams->setDecimals(5);
}
// Default value for seam allowence is 1 cm. But pattern have different units, so just set 1 in dialog not enough.
ui.doubleSpinBoxSeams->setValue(UnitConvertor(1, Unit::Cm, qApp->patternUnit()));
bOk = ui.buttonBox->button(QDialogButtonBox::Ok);
SCASSERT(bOk != nullptr);