From 3528c626e7494bec9f4fdfca7bb22451d98004e0 Mon Sep 17 00:00:00 2001 From: Uwe Date: Sun, 12 Jun 2022 17:24:41 +0200 Subject: [PATCH] [FEM] fix plots of line filter - when the line geometry changed, the axis data must be refreshed to get correct plots --- src/Mod/Fem/App/FemPostFilter.h | 2 +- src/Mod/Fem/Gui/TaskPostBoxes.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mod/Fem/App/FemPostFilter.h b/src/Mod/Fem/App/FemPostFilter.h index 660f0e71b3..22a693cb0e 100644 --- a/src/Mod/Fem/App/FemPostFilter.h +++ b/src/Mod/Fem/App/FemPostFilter.h @@ -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: diff --git a/src/Mod/Fem/Gui/TaskPostBoxes.cpp b/src/Mod/Fem/Gui/TaskPostBoxes.cpp index 978a3d40fb..4610456cb5 100644 --- a/src/Mod/Fem/Gui/TaskPostBoxes.cpp +++ b/src/Mod/Fem/Gui/TaskPostBoxes.cpp @@ -707,6 +707,8 @@ void TaskPostDataAlongLine::point1Changed(double) { // refresh the color bar range auto currentField = getTypedView()->Field.getValue(); getTypedView()->Field.setValue(currentField); + // also the axis data must be refreshed to get correct plots + static_cast(getObject())->GetAxisData(); } void TaskPostDataAlongLine::point2Changed(double) { @@ -720,6 +722,8 @@ void TaskPostDataAlongLine::point2Changed(double) { // refresh the color bar range auto currentField = getTypedView()->Field.getValue(); getTypedView()->Field.setValue(currentField); + // also the axis data must be refreshed to get correct plots + static_cast(getObject())->GetAxisData(); } void TaskPostDataAlongLine::resolutionChanged(int val) {