FEM: task panels, improve units value handling

This commit is contained in:
Bernd Hahnebach
2021-08-17 21:31:25 +02:00
parent 6c977d8511
commit 40d29fe329
5 changed files with 30 additions and 34 deletions

View File

@@ -107,14 +107,14 @@ class _TaskPanel(object):
not self._paramWidget.velocityXBox.isChecked()
if self._obj.VelocityXEnabled:
quantity = Units.Quantity(self._paramWidget.velocityXTxt.text())
self._obj.VelocityX = float(quantity.getValueAs(unit))
self._obj.VelocityX = quantity.getValueAs(unit).Value
self._obj.VelocityYEnabled = \
not self._paramWidget.velocityYBox.isChecked()
if self._obj.VelocityYEnabled:
quantity = Units.Quantity(self._paramWidget.velocityYTxt.text())
self._obj.VelocityY = float(quantity.getValueAs(unit))
self._obj.VelocityY = quantity.getValueAs(unit).Value
self._obj.VelocityZEnabled = \
not self._paramWidget.velocityZBox.isChecked()
if self._obj.VelocityZEnabled:
quantity = Units.Quantity(self._paramWidget.velocityZTxt.text())
self._obj.VelocityZ = float(quantity.getValueAs(unit))
self._obj.VelocityZ = quantity.getValueAs(unit).Value