[TD]fix detail of section not displayed on restore

This commit is contained in:
Wanderer Fan
2022-07-29 10:05:56 -04:00
committed by WandererFan
parent 0babc10a99
commit 2483b1524e
3 changed files with 30 additions and 51 deletions

View File

@@ -213,25 +213,13 @@ App::DocumentObjectExecReturn *DrawViewDetail::execute()
}
DrawViewPart* dvp = static_cast<DrawViewPart*>(baseObj);
DrawProjGroupItem* dpgi = nullptr;
if (dvp->isDerivedFrom(TechDraw::DrawProjGroupItem::getClassTypeId())) {
dpgi= static_cast<TechDraw::DrawProjGroupItem*>(dvp);
}
DrawViewSection* dvs = nullptr;
TopoDS_Shape shape;
if (dvp->isDerivedFrom(TechDraw::DrawViewSection::getClassTypeId())) {
dvs= static_cast<TechDraw::DrawViewSection*>(dvp);
}
TopoDS_Shape shape;
if (dvs) {
shape = dvs->getCutShape();
}
else if (dpgi) {
shape = dpgi->getSourceShapeFused();
}
else {
} else {
//getSourceShapeFused will complain if called on section
shape = dvp->getSourceShapeFused();
}