Allow interchangable use of link properties and their derivatives

This commit is contained in:
Stefan Tröger
2017-07-20 20:20:15 +02:00
committed by wmayer
parent 987a5b36b9
commit d0954e6e42
8 changed files with 15 additions and 15 deletions

View File

@@ -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<const App::PropertyLink*>(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<App::DocumentObject*> pShapes = static_cast<const App::PropertyLinkList*>(prop)->getValues();
for (std::vector<App::DocumentObject*>::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<App::DocumentObject*> pShapes = static_cast<const App::PropertyLinkList*>(prop)->getValues();
for (std::vector<App::DocumentObject*>::iterator it = pShapes.begin(); it != pShapes.end(); ++it) {
if (*it)