+ issue #0002546: FEM constraint parameters can't be smaller than 0,01 (N)
This commit is contained in:
parent
c5d0e08cbc
commit
99ad0b71b9
|
@ -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";
|
||||
|
|
|
@ -34,13 +34,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="spinForce">
|
||||
<property name="minimum">
|
||||
<double>-99999.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>99999.000000000000000</double>
|
||||
</property>
|
||||
<widget class="Gui::QuantitySpinBox" name="spinForce">
|
||||
<property name="value">
|
||||
<double>500.000000000000000</double>
|
||||
</property>
|
||||
|
@ -84,6 +78,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