From f620b34a825e38b6d3af4bf7c3c295ae014bca9c Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 26 Dec 2016 14:08:26 +0300 Subject: [PATCH] Fix a bug with deletion of a dimension in a sketcher --- src/XGUI/XGUI_Selection.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/XGUI/XGUI_Selection.cpp b/src/XGUI/XGUI_Selection.cpp index f1d2a09b7..56019f8aa 100644 --- a/src/XGUI/XGUI_Selection.cpp +++ b/src/XGUI/XGUI_Selection.cpp @@ -123,7 +123,7 @@ void XGUI_Selection::fillPresentation(ModuleBase_ViewerPrsPtr& thePrs, const Handle(SelectMgr_EntityOwner)& theOwner) const { thePrs->setOwner(theOwner); - + Handle(SelectMgr_SelectableObject) aSelectable = theOwner->Selectable(); Handle(AIS_InteractiveObject) anIO = Handle(AIS_InteractiveObject)::DownCast(theOwner->Selectable()); thePrs->setInteractive(anIO); @@ -233,6 +233,13 @@ QList XGUI_Selection::getHighlighted() const XGUI_Displayer* aDisplayer = myWorkshop->displayer(); for (aContext->InitDetected(); aContext->MoreDetected(); aContext->NextDetected()) { Handle(SelectMgr_EntityOwner) anOwner = aContext->DetectedOwner(); + try { + // It is checking of existence of presentation object + // BUG of OCCT + Handle(AIS_InteractiveObject) aTest = aContext->DetectedInteractive(); + } catch (...) { + continue; + } if (!anOwner.IsNull()) { if (aSelectedIds.contains((long)anOwner.get())) continue; -- 2.39.2