Salome HOME
Implementation '22873: EDF 8651 GEOM: Annotate shapes into the OCC viewer' issue
[modules/geom.git] / src / GEOMGUI / GEOMGUI_OCCSelector.cxx
index b79ea3d350a7f6ea381854b8f6b8b2192c5957d7..4ab85d38aaef72bab3eb7d43aaf3f102085ba833 100644 (file)
@@ -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 <Basics_OCCTVersion.hxx>
 
@@ -300,8 +301,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 ) )