]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix a bug with deletion of a dimension in a sketcher
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 26 Dec 2016 11:08:26 +0000 (14:08 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 26 Dec 2016 11:08:26 +0000 (14:08 +0300)
src/XGUI/XGUI_Selection.cpp

index f1d2a09b7c58a738a7b8be2f6c77214469719787..56019f8aac06b357162b8a007bef65c445402dbc 100644 (file)
@@ -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<ModuleBase_ViewerPrsPtr> 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;