From: vsv Date: Mon, 26 Dec 2016 11:08:26 +0000 (+0300) Subject: Fix a bug with deletion of a dimension in a sketcher X-Git-Tag: V_2.7.0~351^2~44 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f620b34a825e38b6d3af4bf7c3c295ae014bca9c;p=modules%2Fshaper.git Fix a bug with deletion of a dimension in a sketcher --- 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;