Fix Detail Highlight when Detail has no Geometry
- Detail circles were no drawn if detail area did not produce any geometry (detail anchor point + radius not over original part.
This commit is contained in:
@@ -288,7 +288,13 @@ App::DocumentObjectExecReturn *DrawViewDetail::execute(void)
|
||||
testBox.SetGap(0.0);
|
||||
BRepBndLib::Add(detail, testBox);
|
||||
if (testBox.IsVoid()) {
|
||||
Base::Console().Message("DrawViewDetail - detail area contains no geometry\n");
|
||||
// Base::Console().Warning("DrawViewDetail - detail area contains no geometry\n");
|
||||
TechDrawGeometry::GeometryObject* go = getGeometryObject();
|
||||
if (go != nullptr) {
|
||||
go->clear();
|
||||
}
|
||||
requestPaint();
|
||||
dvp->requestPaint();
|
||||
return new App::DocumentObjectExecReturn("DVDetail - detail area contains no geometry");
|
||||
}
|
||||
|
||||
|
||||
@@ -331,6 +331,8 @@ void QGIViewPart::drawViewPart()
|
||||
return;
|
||||
}
|
||||
if (!viewPart->hasGeometry()) {
|
||||
removePrimitives(); //clean the slate
|
||||
removeDecorations();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -754,10 +756,6 @@ void QGIViewPart::drawHighlight(TechDraw::DrawViewDetail* viewDetail, bool b)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!viewDetail->hasGeometry()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto vp = static_cast<ViewProviderViewPart*>(getViewProvider(getViewObject()));
|
||||
if ( vp == nullptr ) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user