[TechDraw] Unify Projection Group parent linking
This commit is contained in:
@@ -181,14 +181,7 @@ void DrawProjGroupItem::onDocumentRestored()
|
||||
|
||||
DrawProjGroup* DrawProjGroupItem::getPGroup() const
|
||||
{
|
||||
std::vector<App::DocumentObject*> parent = getInList();
|
||||
for (std::vector<App::DocumentObject*>::iterator it = parent.begin(); it != parent.end(); ++it) {
|
||||
if ((*it)->isDerivedFrom<DrawProjGroup>()) {
|
||||
DrawProjGroup* result = dynamic_cast<TechDraw::DrawProjGroup *>(*it);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
return dynamic_cast<DrawProjGroup *>(getCollection());
|
||||
}
|
||||
|
||||
bool DrawProjGroupItem::isAnchor(void) const
|
||||
|
||||
Reference in New Issue
Block a user