| 65 | } |
| 66 | |
| 67 | void 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 |
nothing calls this directly
no test coverage detected