diff --git a/src/App/Document.cpp b/src/App/Document.cpp index 392605e4ad..711e1ffaf3 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -2801,7 +2801,7 @@ DocumentObject* Document::moveObject(DocumentObject* obj, bool recursive) std::map props; obj->getPropertyMap(props); for (std::map::iterator it = props.begin(); it != props.end(); ++it) { - if (it->second->getTypeId() == PropertyLink::getClassTypeId()) { + if (it->second->getTypeId().isDerivedFrom(PropertyLink::getClassTypeId())) { DocumentObject* link = static_cast(it->second)->getValue(); if (recursive) { moveObject(link, recursive); @@ -2811,7 +2811,7 @@ DocumentObject* Document::moveObject(DocumentObject* obj, bool recursive) static_cast(it->second)->setValue(0); } } - else if (it->second->getTypeId() == PropertyLinkList::getClassTypeId()) { + else if (it->second->getTypeId().isDerivedFrom(PropertyLinkList::getClassTypeId())) { std::vector links = static_cast(it->second)->getValues(); if (recursive) { for (std::vector::iterator jt = links.begin(); jt != links.end(); ++jt) diff --git a/src/Mod/Inspection/Gui/ViewProviderInspection.cpp b/src/Mod/Inspection/Gui/ViewProviderInspection.cpp index 42f9c80034..bb2184721d 100644 --- a/src/Mod/Inspection/Gui/ViewProviderInspection.cpp +++ b/src/Mod/Inspection/Gui/ViewProviderInspection.cpp @@ -184,7 +184,7 @@ void ViewProviderInspection::attach(App::DocumentObject *pcFeat) void ViewProviderInspection::updateData(const App::Property* prop) { // set to the expected size - if (prop->getTypeId() == App::PropertyLink::getClassTypeId()) { + if (prop->getTypeId().isDerivedFrom(App::PropertyLink::getClassTypeId())) { App::GeoFeature* object = static_cast(prop)->getValue(); if (object) { float accuracy=0; diff --git a/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp b/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp index d0b0a19928..13a9c61e15 100644 --- a/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp +++ b/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp @@ -288,7 +288,7 @@ void ViewProviderMeshCurvature::attach(App::DocumentObject *pcFeat) void ViewProviderMeshCurvature::updateData(const App::Property* prop) { // set to the expected size - if (prop->getTypeId() == App::PropertyLink::getClassTypeId()) { + if (prop->getTypeId().isDerivedFrom(App::PropertyLink::getClassTypeId())) { Mesh::Feature* object = static_cast(prop)->getValue(); this->pcLinkRoot->removeAllChildren(); if (object) { diff --git a/src/Mod/Part/Gui/ViewProviderBoolean.cpp b/src/Mod/Part/Gui/ViewProviderBoolean.cpp index 23d98670be..7aa4668049 100644 --- a/src/Mod/Part/Gui/ViewProviderBoolean.cpp +++ b/src/Mod/Part/Gui/ViewProviderBoolean.cpp @@ -130,7 +130,7 @@ void ViewProviderBoolean::updateData(const App::Property* prop) } } } - else if (prop->getTypeId() == App::PropertyLink::getClassTypeId()) { + else if (prop->getTypeId().isDerivedFrom(App::PropertyLink::getClassTypeId())) { App::DocumentObject *pBase = static_cast(prop)->getValue(); if (pBase) Gui::Application::Instance->hideViewProvider(pBase); @@ -216,7 +216,7 @@ void ViewProviderMultiFuse::updateData(const App::Property* prop) this->DiffuseColor.setValues(colBool); } - else if (prop->getTypeId() == App::PropertyLinkList::getClassTypeId()) { + else if (prop->getTypeId().isDerivedFrom(App::PropertyLinkList::getClassTypeId())) { std::vector pShapes = static_cast(prop)->getValues(); for (std::vector::iterator it = pShapes.begin(); it != pShapes.end(); ++it) { if (*it) @@ -344,7 +344,7 @@ void ViewProviderMultiCommon::updateData(const App::Property* prop) this->DiffuseColor.setValues(colBool); } - else if (prop->getTypeId() == App::PropertyLinkList::getClassTypeId()) { + else if (prop->getTypeId().isDerivedFrom(App::PropertyLinkList::getClassTypeId())) { std::vector pShapes = static_cast(prop)->getValues(); for (std::vector::iterator it = pShapes.begin(); it != pShapes.end(); ++it) { if (*it) diff --git a/src/Mod/Part/Gui/ViewProviderCompound.cpp b/src/Mod/Part/Gui/ViewProviderCompound.cpp index 61b286c17c..aa9e1ff0bb 100644 --- a/src/Mod/Part/Gui/ViewProviderCompound.cpp +++ b/src/Mod/Part/Gui/ViewProviderCompound.cpp @@ -106,7 +106,7 @@ void ViewProviderCompound::updateData(const App::Property* prop) this->DiffuseColor.setValues(compCol); } - else if (prop->getTypeId() == App::PropertyLinkList::getClassTypeId()) { + else if (prop->getTypeId().isDerivedFrom(App::PropertyLinkList::getClassTypeId())) { const std::vector& pBases = static_cast(prop)->getValues(); for (std::vector::const_iterator it = pBases.begin(); it != pBases.end(); ++it) { if (*it) Gui::Application::Instance->hideViewProvider(*it); diff --git a/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp b/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp index 7479ed452a..13a216f5aa 100644 --- a/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp +++ b/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp @@ -310,10 +310,10 @@ App::DocumentObject* TaskFeaturePick::makeCopy(App::DocumentObject* obj, std::st //independent copies don't have links and are not attached if(independent && ( - prop->getTypeId() == App::PropertyLink::getClassTypeId() || - prop->getTypeId() == App::PropertyLinkList::getClassTypeId() || - prop->getTypeId() == App::PropertyLinkSub::getClassTypeId() || - prop->getTypeId() == App::PropertyLinkSubList::getClassTypeId()|| + prop->getTypeId().isDerivedFrom(App::PropertyLink::getClassTypeId()) || + prop->getTypeId().isDerivedFrom(App::PropertyLinkList::getClassTypeId()) || + prop->getTypeId().isDerivedFrom(App::PropertyLinkSub::getClassTypeId()) || + prop->getTypeId().isDerivedFrom(App::PropertyLinkSubList::getClassTypeId())|| ( prop->getGroup() && strcmp(prop->getGroup(),"Attachment")==0) )) { ++it; diff --git a/src/Mod/Path/Gui/ViewProviderArea.cpp b/src/Mod/Path/Gui/ViewProviderArea.cpp index 040bacbea9..1efcb53952 100644 --- a/src/Mod/Path/Gui/ViewProviderArea.cpp +++ b/src/Mod/Path/Gui/ViewProviderArea.cpp @@ -92,7 +92,7 @@ void ViewProviderArea::dropObject(App::DocumentObject* obj) void ViewProviderArea::updateData(const App::Property* prop) { PartGui::ViewProviderPart::updateData(prop); - if (prop->getTypeId() == App::PropertyLinkList::getClassTypeId()) { + if (prop->getTypeId().isDerivedFrom(App::PropertyLinkList::getClassTypeId())) { std::vector pShapes = static_cast(prop)->getValues(); for (std::vector::iterator it = pShapes.begin(); it != pShapes.end(); ++it) { if (*it) @@ -170,7 +170,7 @@ void ViewProviderAreaView::dropObject(App::DocumentObject* obj) void ViewProviderAreaView::updateData(const App::Property* prop) { PartGui::ViewProviderPlaneParametric::updateData(prop); - if (prop->getTypeId() == App::PropertyLink::getClassTypeId()) + if (prop->getTypeId().isDerivedFrom(App::PropertyLink::getClassTypeId())) Gui::Application::Instance->hideViewProvider( static_cast(prop)->getValue()); } diff --git a/src/Mod/Path/Gui/ViewProviderPathShape.cpp b/src/Mod/Path/Gui/ViewProviderPathShape.cpp index 81b21372eb..c65f184740 100644 --- a/src/Mod/Path/Gui/ViewProviderPathShape.cpp +++ b/src/Mod/Path/Gui/ViewProviderPathShape.cpp @@ -92,7 +92,7 @@ void ViewProviderPathShape::dropObject(App::DocumentObject* obj) void ViewProviderPathShape::updateData(const App::Property* prop) { PathGui::ViewProviderPath::updateData(prop); - if (prop->getTypeId() == App::PropertyLinkList::getClassTypeId()) { + if (prop->getTypeId().isDerivedFrom(App::PropertyLinkList::getClassTypeId())) { std::vector pShapes = static_cast(prop)->getValues(); for (std::vector::iterator it = pShapes.begin(); it != pShapes.end(); ++it) { if (*it)