+ fixes 0001563: Add units to Linear Pattern in PartDesign
This commit is contained in:
parent
b5b929cf58
commit
d2cbd6817f
|
@ -129,9 +129,11 @@ void TaskLinearPatternParameters::setupUI()
|
|||
|
||||
ui->comboDirection->setEnabled(true);
|
||||
ui->checkReverse->setEnabled(true);
|
||||
ui->spinLength->blockSignals(true);
|
||||
ui->spinLength->setEnabled(true);
|
||||
ui->spinLength->setUnit(Base::Unit::Length);
|
||||
ui->spinLength->blockSignals(false);
|
||||
ui->spinOccurrences->setEnabled(true);
|
||||
ui->spinLength->setDecimals(Base::UnitsApi::getDecimals());
|
||||
updateUI();
|
||||
}
|
||||
|
||||
|
@ -370,7 +372,7 @@ const bool TaskLinearPatternParameters::getReverse(void) const
|
|||
|
||||
const double TaskLinearPatternParameters::getLength(void) const
|
||||
{
|
||||
return ui->spinLength->value();
|
||||
return ui->spinLength->value().getValue();
|
||||
}
|
||||
|
||||
const unsigned TaskLinearPatternParameters::getOccurrences(void) const
|
||||
|
|
|
@ -75,12 +75,9 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="spinLength">
|
||||
<property name="decimals">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>999999.000000000000000</double>
|
||||
<widget class="Gui::QuantitySpinBox" name="spinLength">
|
||||
<property name="unit" stdset="0">
|
||||
<string>mm</string>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>100.000000000000000</double>
|
||||
|
@ -146,6 +143,13 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::QuantitySpinBox</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>Gui/QuantitySpinBox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
Loading…
Reference in New Issue
Block a user