-// 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
// 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
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com)
//
#include "GEOMGUI_OCCSelector.h"
+#include "GEOM_Annotation.hxx"
#include <LightApp_DataSubOwner.h>
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;
{
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 ) )