Extensions: Handle new dynamic_cast's

This commit is contained in:
Stefan Tröger
2016-09-04 17:42:26 +02:00
committed by wmayer
parent ab692a4c08
commit 258be36aad
13 changed files with 83 additions and 52 deletions

View File

@@ -330,7 +330,9 @@ SbBox3f ViewProviderDatum::getRelevantBoundBox () const {
App::DocumentObject* group = App::DocumentObjectGroup::getGroupOfObject ( this->getObject () );
if(group) {
objs = dynamic_cast<App::GroupExtension*>(group->getExtension(App::GroupExtension::getClassTypeId()))->getObjects ();
auto* ext = group->getExtensionByType<App::GroupExtension>();
if(ext)
objs = ext->getObjects ();
} else {
// Fallback to whole document
objs = this->getObject ()->getDocument ()->getObjects ();