[FEM] fix plots of line filter

- when the line geometry changed, the axis data must be refreshed to get correct plots
This commit is contained in:
Uwe
2022-06-12 17:24:41 +02:00
parent a06cc956c5
commit 3528c626e7
2 changed files with 5 additions and 1 deletions

View File

@@ -117,11 +117,11 @@ public:
return "FemGui::ViewProviderFemPostDataAlongLine";
}
virtual short int mustExecute(void) const;
void GetAxisData();
protected:
virtual App::DocumentObjectExecReturn* execute(void);
virtual void onChanged(const App::Property* prop);
void GetAxisData();
virtual void handleChangedPropertyType(Base::XMLReader& reader, const char* TypeName, App::Property* prop);
private:

View File

@@ -707,6 +707,8 @@ void TaskPostDataAlongLine::point1Changed(double) {
// refresh the color bar range
auto currentField = getTypedView<ViewProviderFemPostObject>()->Field.getValue();
getTypedView<ViewProviderFemPostObject>()->Field.setValue(currentField);
// also the axis data must be refreshed to get correct plots
static_cast<Fem::FemPostDataAlongLineFilter*>(getObject())->GetAxisData();
}
void TaskPostDataAlongLine::point2Changed(double) {
@@ -720,6 +722,8 @@ void TaskPostDataAlongLine::point2Changed(double) {
// refresh the color bar range
auto currentField = getTypedView<ViewProviderFemPostObject>()->Field.getValue();
getTypedView<ViewProviderFemPostObject>()->Field.setValue(currentField);
// also the axis data must be refreshed to get correct plots
static_cast<Fem::FemPostDataAlongLineFilter*>(getObject())->GetAxisData();
}
void TaskPostDataAlongLine::resolutionChanged(int val) {