Set single step depend on measurement unit.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-06-21 13:53:33 +03:00
parent ed6c72bda9
commit b7d62d3dbe
2 changed files with 16 additions and 1 deletions

View File

@ -2918,18 +2918,33 @@ void TMainWindow::SetDecimals()
{
case Unit::Cm:
ui->doubleSpinBoxBaseValue->setDecimals(1);
ui->doubleSpinBoxBaseValue->setSingleStep(0.1);
ui->doubleSpinBoxInSizes->setDecimals(1);
ui->doubleSpinBoxInSizes->setSingleStep(0.1);
ui->doubleSpinBoxInHeights->setDecimals(1);
ui->doubleSpinBoxInHeights->setSingleStep(0.1);
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:
ui->doubleSpinBoxBaseValue->setDecimals(5);
ui->doubleSpinBoxBaseValue->setSingleStep(0.00001);
ui->doubleSpinBoxInSizes->setDecimals(5);
ui->doubleSpinBoxInSizes->setSingleStep(0.00001);
ui->doubleSpinBoxInHeights->setDecimals(5);
ui->doubleSpinBoxInHeights->setSingleStep(0.00001);
break;
default:
break;

View File

@ -47,7 +47,7 @@
<string/>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="tabMeasurements">
<attribute name="icon">