Salome HOME
SMH: Add again in binary mode
[modules/gui.git] / src / SalomeApp / SalomeApp_OCCSelector.cxx
index 839b0dec09e9505e559dc807e6d55c7a91dfc884..b9d4d5af30f5c1aacbc55b32e19bf6ed6d7a43f5 100644 (file)
@@ -39,11 +39,12 @@ void SalomeApp_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const
   AIS_ListOfInteractive aSelList;
   myViewer->getSelectedObjects( aSelList );
   for ( AIS_ListIteratorOfListOfInteractive anIt( aSelList ); anIt.More(); anIt.Next() )
-  {
-    QString entryStr = entry( anIt.Value() );
-    if ( !entryStr.isEmpty() )
-      aList.append( SUIT_DataOwnerPtr( new SalomeApp_DataOwner( entryStr ) ) );
-  }
+    if ( !anIt.Value().IsNull() )
+    {
+      Handle(SALOME_InteractiveObject) anObj = Handle(SALOME_InteractiveObject)::DownCast(anIt.Value()->GetOwner());
+      if( !anObj.IsNull() )
+        aList.append( SUIT_DataOwnerPtr( new SalomeApp_DataOwner( anObj ) ) );
+    }
 }
 
 void SalomeApp_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList )