]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
IPAL21983 WinTC5.1.4: Impossible create a group on selected subshapes
authordmv <dmv@opencascade.com>
Fri, 17 Sep 2010 12:41:39 +0000 (12:41 +0000)
committerdmv <dmv@opencascade.com>
Fri, 17 Sep 2010 12:41:39 +0000 (12:41 +0000)
src/GEOMGUI/GEOMGUI_OCCSelector.cxx

index 8a35be026e153b732440704ad75f31d94003823f..36a455dcf3904ea7d24ff196aa61c9e15454a254 100644 (file)
@@ -114,11 +114,12 @@ void GEOMGUI_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const
 
       if (!entryStr.isEmpty())
       {
+        Handle(SALOME_InteractiveObject) anIO = Handle(SALOME_InteractiveObject)::DownCast(io->GetOwner()); 
         LightApp_DataOwner* owner;
         if (index > -1) // Local Selection
           owner = new LightApp_DataSubOwner (entryStr, index);
-        else // Global Selection
-          owner = new LightApp_DataOwner (entryStr);
+        else if ( !anIO.IsNull() ) // Global Selection
+          owner = new LightApp_DataOwner( anIO );
 
         aList.append(SUIT_DataOwnerPtr(owner));
       }
@@ -134,8 +135,11 @@ void GEOMGUI_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const
 
       if ( !entryStr.isEmpty() )
       {
-        LightApp_DataOwner* owner = new LightApp_DataOwner( entryStr );
-        aList.append( SUIT_DataOwnerPtr( owner ) );
+        Handle(SALOME_InteractiveObject) anIO = Handle(SALOME_InteractiveObject)::DownCast(io->GetOwner()); 
+        if ( !anIO.IsNull() ) {
+          LightApp_DataOwner* owner = new LightApp_DataOwner( anIO );
+          aList.append( SUIT_DataOwnerPtr( owner ) );
+        }
       }
     }
   }