Gui: fix ViewProviderGeometryObject

* fix several linter warnings
* remove code that cannot be executed: inside the constructor it cannot ever happen that getObject()
  returns a valid object
* in ViewProviderGeometryObject::handleChangedPropertyName call the method of the direct base class
  as otherwise this may break the mechanism in the future
* Shape is a property of an extension module -> move its handling to ViewProviderPartExt
This commit is contained in:
wmayer
2024-04-05 17:29:10 +02:00
parent acb7be7a95
commit 92b1e77744
2 changed files with 32 additions and 33 deletions

View File

@@ -844,6 +844,11 @@ void ViewProviderPartExt::updateData(const App::Property* prop)
}
}
}
if (propName && strcmp(propName, "Shape") == 0) {
// Reapply the appearance
const App::Material& Mat = ShapeAppearance[0];
setSoMaterial(Mat);
}
Gui::ViewProviderGeometryObject::updateData(prop);
}