MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / onChanged

Method onChanged

src/Mod/Points/App/PointsFeature.cpp:67–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void Feature::onChanged(const App::Property* prop)
68{
69 // if the placement has changed apply the change to the point data as well
70 if (prop == &this->Placement) {
71 this->Points.setTransform(this->Placement.getValue().toMatrix());
72 }
73 // if the point data has changed check and adjust the transformation as well
74 else if (prop == &this->Points) {
75 try {
76 Base::Placement p;
77 p.fromMatrix(this->Points.getTransform());
78 if (p != this->Placement.getValue()) {
79 this->Placement.setValue(p);
80 }
81 }
82 catch (const Base::ValueError&) {
83 }
84 }
85
86 GeoFeature::onChanged(prop);
87}
88
89// ---------------------------------------------------------
90

Callers

nothing calls this directly

Calls 7

onChangedFunction · 0.85
fromMatrixMethod · 0.80
setTransformMethod · 0.45
toMatrixMethod · 0.45
getValueMethod · 0.45
getTransformMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected