diff --git a/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp b/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp
index 710defeb8..33deb1b00 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp
+++ b/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp
@@ -116,7 +116,7 @@ TaskFemConstraintForce::TaskFemConstraintForce(ViewProviderFemConstraintForce *C
ui->listReferences->addItem(makeRefText(Objects[i], SubElements[i]));
if (Objects.size() > 0)
ui->listReferences->setCurrentRow(0, QItemSelectionModel::ClearAndSelect);
- ui->lineDirection->setText(dir.isEmpty() ? tr("") : dir);
+ ui->lineDirection->setText(dir.isEmpty() ? QString() : dir);
ui->checkReverse->setChecked(reversed);
ui->spinForce->blockSignals(false);
@@ -267,7 +267,7 @@ void TaskFemConstraintForce::onCheckReverse(const bool pressed)
double TaskFemConstraintForce::getForce(void) const
{
- return ui->spinForce->value();
+ return ui->spinForce->value().getValue();
}
const std::string TaskFemConstraintForce::getReferences() const
@@ -357,13 +357,15 @@ bool TaskDlgFemConstraintForce::accept()
if (parameterForce->getForce()<=0)
{
- QMessageBox::warning(parameter, tr("Input error"), tr("Please specify a force greater than 0"));
+ QMessageBox::warning(parameter, tr("Input error"), tr("Please specify a force greater than 0"));
return false;
}
else
{
- Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Force = %f",name.c_str(), parameterForce->getForce());
+ QByteArray num = QByteArray::number(parameterForce->getForce());
+ Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Force = %s",name.c_str(), num.data());
}
+
std::string dirname = parameterForce->getDirectionName().data();
std::string dirobj = parameterForce->getDirectionObject().data();
std::string scale = "1";
diff --git a/src/Mod/Fem/Gui/TaskFemConstraintForce.ui b/src/Mod/Fem/Gui/TaskFemConstraintForce.ui
index 83536403d..006f5f4b4 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintForce.ui
+++ b/src/Mod/Fem/Gui/TaskFemConstraintForce.ui
@@ -34,13 +34,7 @@
-
-
-
- -99999.000000000000000
-
-
- 99999.000000000000000
-
+
500.000000000000000
@@ -84,6 +78,13 @@
+
+
+ Gui::QuantitySpinBox
+ QWidget
+
+
+