+ fixes 0001563: Add units to Linear Pattern in PartDesign

This commit is contained in:
wmayer
2014-07-22 10:39:44 +02:00
parent b5b929cf58
commit d2cbd6817f
2 changed files with 14 additions and 8 deletions

View File

@@ -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