[TechDraw] Reimplement Rich Annotation parent linking

This commit is contained in:
pavltom
2024-02-15 17:06:21 +01:00
committed by WandererFan
parent 0c09c6257c
commit d11d3cd7b8
18 changed files with 136 additions and 194 deletions

View File

@@ -45,7 +45,6 @@
#include <Mod/TechDraw/App/DrawLeaderLine.h>
#include <Mod/TechDraw/App/DrawPage.h>
#include <Mod/TechDraw/App/DrawProjGroupItem.h>
#include <Mod/TechDraw/App/DrawRichAnno.h>
#include <Mod/TechDraw/App/DrawTemplate.h>
#include <Mod/TechDraw/App/DrawView.h>
#include <Mod/TechDraw/App/DrawViewBalloon.h>
@@ -394,7 +393,6 @@ std::vector<App::DocumentObject*> ViewProviderPage::claimChildren(void) const
// DrawViewDimension
// DrawViewBalloon
// DrawLeaderLine
// DrawRichAnno
// any FeatuerView in a DrawViewClip
// DrawHatch
// DrawWeldSymbol
@@ -412,21 +410,11 @@ std::vector<App::DocumentObject*> ViewProviderPage::claimChildren(void) const
}
App::DocumentObject* docObj = *it;
//DrawRichAnno with no parent is child of Page
TechDraw::DrawRichAnno* dra = dynamic_cast<TechDraw::DrawRichAnno*>(*it);
if (dra) {
if (!dra->AnnoParent.getValue()) {
temp.push_back(*it);//no parent, belongs to page
}
continue;//has a parent somewhere else
}
// Don't collect if dimension, projection group item, hatch or member of ClipGroup as these should be grouped elsewhere
if (docObj->isDerivedFrom(TechDraw::DrawProjGroupItem::getClassTypeId())
|| docObj->isDerivedFrom(TechDraw::DrawViewDimension::getClassTypeId())
|| docObj->isDerivedFrom(TechDraw::DrawHatch::getClassTypeId())
|| docObj->isDerivedFrom(TechDraw::DrawViewBalloon::getClassTypeId())
|| docObj->isDerivedFrom(TechDraw::DrawRichAnno::getClassTypeId())
|| docObj->isDerivedFrom(TechDraw::DrawLeaderLine::getClassTypeId())
|| docObj->isDerivedFrom(TechDraw::DrawWeldSymbol::getClassTypeId())
|| (featView && featView->isInClip()))