From 893f33004301779c1f984a976d1071d6d0e6437f Mon Sep 17 00:00:00 2001 From: jriegel Date: Sun, 9 Feb 2014 19:21:01 +0100 Subject: [PATCH] Fix default bug in Pad dialog --- src/Gui/InputField.cpp | 2 +- src/Mod/PartDesign/Gui/TaskPadParameters.cpp | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Gui/InputField.cpp b/src/Gui/InputField.cpp index b0ab87c31..7a08e170f 100644 --- a/src/Gui/InputField.cpp +++ b/src/Gui/InputField.cpp @@ -205,7 +205,7 @@ void InputField::setToLastUsedValue(void) { std::vector hist = getHistory(); if(hist.size()>0) - this->setText(hist[0]); + this->setValue(Base::Quantity::parse(hist[0])); } diff --git a/src/Mod/PartDesign/Gui/TaskPadParameters.cpp b/src/Mod/PartDesign/Gui/TaskPadParameters.cpp index ef1ee4a28..c3125034c 100644 --- a/src/Mod/PartDesign/Gui/TaskPadParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskPadParameters.cpp @@ -117,11 +117,6 @@ TaskPadParameters::TaskPadParameters(ViewProviderPad *PadView,bool newObj, QWidg ui->lengthEdit2->setMaximum(INT_MAX); ui->lengthEdit2->setValue(l2); - // if it is a newly created object use the last value of the history - if(newObj){ - ui->lengthEdit->setToLastUsedValue(); - ui->lengthEdit2->setToLastUsedValue(); - } ui->checkBoxMidplane->setChecked(midplane); // According to bug #0000521 the reversed option @@ -148,6 +143,14 @@ TaskPadParameters::TaskPadParameters(ViewProviderPad *PadView,bool newObj, QWidg ui->lineFaceName->blockSignals(false); ui->changeMode->blockSignals(false); updateUI(index); + + // if it is a newly created object use the last value of the history + if(newObj){ + ui->lengthEdit->setToLastUsedValue(); + ui->lengthEdit2->setToLastUsedValue(); + } + + } void TaskPadParameters::updateUI(int index)