X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMGUI%2FGEOMGUI_OCCSelector.cxx;h=7ab8db1f9a4bc76ac6c2471d0936e742cb2d0563;hb=579fb21c339df3afb2ec6cb52c8b1d6b2cb85597;hp=faf21e358a184b7b52b86e77411979d78143cbf7;hpb=ed9f4e67b51855675fa7b43a9673cfd972e224e8;p=modules%2Fgeom.git diff --git a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx index faf21e358..7ab8db1f9 100644 --- a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx +++ b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -24,6 +24,7 @@ // Author : Alexander SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com) // #include "GEOMGUI_OCCSelector.h" +#include "GEOM_Annotation.hxx" #include @@ -176,7 +177,11 @@ static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj, Handle(SelectMgr_Selection) sel = theObj->Selection( m ); for ( sel->Init(); sel->More(); sel->Next() ) { - Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive(); + const Handle(SelectMgr_SensitiveEntity) aHSenEntity = sel->Sensitive(); + if( aHSenEntity.IsNull() ) + continue; + + Handle(SelectBasics_SensitiveEntity) entity = aHSenEntity->BaseSensitive(); if ( entity.IsNull() ) continue; @@ -290,8 +295,16 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) { anOwner = Handle(StdSelect_BRepOwner)::DownCast(owners( i )); - if ( anOwner.IsNull() || !anOwner->HasShape() ) + if ( anOwner.IsNull() || !anOwner->HasShape() ) { + if ( globalSelMap.contains( entryStr ) ) { + Handle(GEOM_Annotation::GEOM_AnnotationOwner) anAnnotationOwner = + Handle(GEOM_Annotation::GEOM_AnnotationOwner)::DownCast(owners( i )); + if ( !anAnnotationOwner.IsNull() ) { + ownersmap.Add( anAnnotationOwner ); + } + } continue; + } // GLOBAL selection if ( !anOwner->ComesFromDecomposition() && globalSelMap.contains( entryStr ) )