Set single step depend on measurement unit.

(grafted from 46c591321c41be7925fb0a0f2e4829ddbe9bed12)

--HG--
branch : release
This commit is contained in:
Roman Telezhynskyi 2016-06-21 14:15:36 +03:00
parent cfb836a573
commit cdb51f2dfe
2 changed files with 16 additions and 1 deletions

View File

@ -2760,18 +2760,33 @@ void TMainWindow::SetDecimals()
{ {
case Unit::Cm: case Unit::Cm:
ui->doubleSpinBoxBaseValue->setDecimals(1); ui->doubleSpinBoxBaseValue->setDecimals(1);
ui->doubleSpinBoxBaseValue->setSingleStep(0.1);
ui->doubleSpinBoxInSizes->setDecimals(1); ui->doubleSpinBoxInSizes->setDecimals(1);
ui->doubleSpinBoxInSizes->setSingleStep(0.1);
ui->doubleSpinBoxInHeights->setDecimals(1); ui->doubleSpinBoxInHeights->setDecimals(1);
ui->doubleSpinBoxInHeights->setSingleStep(0.1);
break; break;
case Unit::Mm: case Unit::Mm:
ui->doubleSpinBoxBaseValue->setDecimals(0); ui->doubleSpinBoxBaseValue->setDecimals(0);
ui->doubleSpinBoxBaseValue->setSingleStep(1);
ui->doubleSpinBoxInSizes->setDecimals(0); ui->doubleSpinBoxInSizes->setDecimals(0);
ui->doubleSpinBoxInSizes->setSingleStep(1);
ui->doubleSpinBoxInHeights->setDecimals(0); ui->doubleSpinBoxInHeights->setDecimals(0);
ui->doubleSpinBoxInHeights->setSingleStep(1);
break; break;
case Unit::Inch: case Unit::Inch:
ui->doubleSpinBoxBaseValue->setDecimals(5); ui->doubleSpinBoxBaseValue->setDecimals(5);
ui->doubleSpinBoxBaseValue->setSingleStep(0.00001);
ui->doubleSpinBoxInSizes->setDecimals(5); ui->doubleSpinBoxInSizes->setDecimals(5);
ui->doubleSpinBoxInSizes->setSingleStep(0.00001);
ui->doubleSpinBoxInHeights->setDecimals(5); ui->doubleSpinBoxInHeights->setDecimals(5);
ui->doubleSpinBoxInHeights->setSingleStep(0.00001);
break; break;
default: default:
break; break;

View File

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