Sandbox: modernize type checking

This commit is contained in:
Florian Foinant-Willig
2023-10-15 21:39:08 +02:00
parent a82a9482ce
commit 7a843ddc29

View File

@@ -67,7 +67,7 @@ private:
void slotChangedObject(const App::DocumentObject& Obj, const App::Property& Prop)
{
#ifdef HAVE_PART
if (object == &Obj && Prop.getTypeId() == Part::PropertyGeometryList::getClassTypeId()) {
if (object == &Obj && Prop.is<Part::PropertyGeometryList>()) {
const Part::PropertyGeometryList& geom = static_cast<const Part::PropertyGeometryList&>(Prop);
const std::vector<Part::Geometry*>& items = geom.getValues();
if (items.size() != 2)