Fix default bug in Pad dialog

This commit is contained in:
jriegel 2014-02-09 19:21:01 +01:00
parent c7e41c6150
commit 893f330043
2 changed files with 9 additions and 6 deletions

View File

@ -205,7 +205,7 @@ void InputField::setToLastUsedValue(void)
{
std::vector<QString> hist = getHistory();
if(hist.size()>0)
this->setText(hist[0]);
this->setValue(Base::Quantity::parse(hist[0]));
}

View File

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