Fixed not enought decimals.

(grafted from e14e15187b021ede6c77fcd0d3fa12b83ef38f60)

--HG--
branch : release
This commit is contained in:
Roman Telezhynskyi 2016-06-22 21:13:50 +03:00
parent e1d87b0414
commit d42fb238df

View File

@ -2761,6 +2761,16 @@ void TMainWindow::SetDecimals()
switch (mUnit) switch (mUnit)
{ {
case Unit::Cm: case Unit::Cm:
ui->doubleSpinBoxBaseValue->setDecimals(2);
ui->doubleSpinBoxBaseValue->setSingleStep(0.01);
ui->doubleSpinBoxInSizes->setDecimals(2);
ui->doubleSpinBoxInSizes->setSingleStep(0.01);
ui->doubleSpinBoxInHeights->setDecimals(2);
ui->doubleSpinBoxInHeights->setSingleStep(0.01);
break;
case Unit::Mm:
ui->doubleSpinBoxBaseValue->setDecimals(1); ui->doubleSpinBoxBaseValue->setDecimals(1);
ui->doubleSpinBoxBaseValue->setSingleStep(0.1); ui->doubleSpinBoxBaseValue->setSingleStep(0.1);
@ -2770,16 +2780,6 @@ void TMainWindow::SetDecimals()
ui->doubleSpinBoxInHeights->setDecimals(1); ui->doubleSpinBoxInHeights->setDecimals(1);
ui->doubleSpinBoxInHeights->setSingleStep(0.1); ui->doubleSpinBoxInHeights->setSingleStep(0.1);
break; break;
case Unit::Mm:
ui->doubleSpinBoxBaseValue->setDecimals(0);
ui->doubleSpinBoxBaseValue->setSingleStep(1);
ui->doubleSpinBoxInSizes->setDecimals(0);
ui->doubleSpinBoxInSizes->setSingleStep(1);
ui->doubleSpinBoxInHeights->setDecimals(0);
ui->doubleSpinBoxInHeights->setSingleStep(1);
break;
case Unit::Inch: case Unit::Inch:
ui->doubleSpinBoxBaseValue->setDecimals(5); ui->doubleSpinBoxBaseValue->setDecimals(5);
ui->doubleSpinBoxBaseValue->setSingleStep(0.00001); ui->doubleSpinBoxBaseValue->setSingleStep(0.00001);