Skip to content

Commit d76f592

Browse files
committed
Fem: Update constraint symbol rotation
1 parent 3370fdf commit d76f592

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,19 @@ void ViewProviderFemConstraint::handleChangedPropertyName(Base::XMLReader& reade
200200
}
201201
}
202202

203+
void ViewProviderFemConstraint::setRotateSymbol(bool rotate)
204+
{
205+
rotateSymbol = rotate;
206+
updateSymbol();
207+
}
208+
203209
void ViewProviderFemConstraint::updateSymbol()
204210
{
205211
auto obj = this->getObject<const Fem::Constraint>();
212+
if (!obj) {
213+
return;
214+
}
215+
206216
const std::vector<Base::Vector3d>& points = obj->Points.getValue();
207217
const std::vector<Base::Vector3d>& normals = obj->Normals.getValue();
208218
if (points.size() != normals.size()) {

src/Mod/Fem/Gui/ViewProviderFemConstraint.h

-5
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,6 @@ inline bool ViewProviderFemConstraint::getRotateSymbol() const
131131
return rotateSymbol;
132132
}
133133

134-
inline void ViewProviderFemConstraint::setRotateSymbol(bool rotate)
135-
{
136-
rotateSymbol = rotate;
137-
}
138-
139134
using ViewProviderFemConstraintPython = Gui::ViewProviderFeaturePythonT<ViewProviderFemConstraint>;
140135

141136

0 commit comments

Comments
 (0)