[FEM] fix point filter initialization issue

- on opening the task dialog of existing point filter, the point value must be displayed
This commit is contained in:
Uwe
2022-06-27 01:07:36 +02:00
parent 5ca796a162
commit 5f5ae2fe4a
2 changed files with 8 additions and 4 deletions

View File

@@ -932,13 +932,17 @@ TaskPostDataAtPoint::TaskPostDataAtPoint(ViewProviderDocumentObject* view, QWidg
ui->centerY->setValue(vec.y);
ui->centerZ->setValue(vec.z);
// update all fields
updateEnumerationList(getTypedView<ViewProviderFemPostObject>()->Field, ui->Field);
// read in point value
auto pointValue = static_cast<Fem::FemPostDataAtPointFilter *>(getObject())->PointData[0];
showValue(pointValue, static_cast<Fem::FemPostDataAtPointFilter *>(getObject())->Unit.getValue());
connect(ui->centerX, SIGNAL(valueChanged(double)), this, SLOT(centerChanged(double)));
connect(ui->centerY, SIGNAL(valueChanged(double)), this, SLOT(centerChanged(double)));
connect(ui->centerZ, SIGNAL(valueChanged(double)), this, SLOT(centerChanged(double)));
// update all fields
updateEnumerationList(getTypedView<ViewProviderFemPostObject>()->Field, ui->Field);
// the point filter object needs to be recomputed
// to fill all fields with data at the current point
getObject()->recomputeFeature();