App: add pure virtual methods to PropertyGeometry to delegate it to the geometry of sub-classes
Following the law of Demeter add some wrapper methods to PropertyGeometry and implement them in sub-classes. As a side-effect this makes some const_cast obsolete
This commit is contained in:
@@ -68,7 +68,7 @@ void FemMeshObject::onChanged(const Property* prop)
|
||||
|
||||
// if the placement has changed apply the change to the mesh data as well
|
||||
if (prop == &this->Placement) {
|
||||
const_cast<Fem::FemMesh&>(this->FemMesh.getValue()).setTransform(this->Placement.getValue().toMatrix());
|
||||
this->FemMesh.setTransform(this->Placement.getValue().toMatrix());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user