]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
*** empty log message ***
authorasl <asl@opencascade.com>
Tue, 31 May 2005 11:14:21 +0000 (11:14 +0000)
committerasl <asl@opencascade.com>
Tue, 31 May 2005 11:14:21 +0000 (11:14 +0000)
src/SalomeApp/SalomeApp_OBSelector.cxx
src/SalomeApp/SalomeApp_OCCSelector.cxx
src/SalomeApp/SalomeApp_SelectionMgr.cxx
src/SalomeApp/SalomeApp_VTKSelector.cxx
src/SalomeApp/SalomeApp_VTKSelector.h

index 025e337bf8a7889171c3d12d168d06a85d8d2fd1..ab8b10990df3e06198e8ded0276bfbe53d29755b 100644 (file)
@@ -36,7 +36,11 @@ void SalomeApp_OBSelector::getSelection( SUIT_DataOwnerPtrList& list ) const
   {
     SalomeApp_DataObject* obj = dynamic_cast<SalomeApp_DataObject*>( it.current() );
     if ( obj )
-      list.append( SUIT_DataOwnerPtr( new SalomeApp_DataOwner( obj->entry() ) ) );
+    {
+      Handle( SALOME_InteractiveObject ) aSObj = new SALOME_InteractiveObject
+       ( obj->entry(), obj->componentDataType(), obj->name() );
+      list.append( SUIT_DataOwnerPtr( new SalomeApp_DataOwner( aSObj  ) ) );
+    }
   }
 }
 
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 )
index 02932334269fccf24efb8ac09131622403220aaa..49a5b15843fc0e4674fd11406fb9e303bb828f8a 100644 (file)
@@ -54,12 +54,12 @@ void SalomeApp_SelectionMgr::selectedObjects( SALOME_ListIO& lst ) const
   SUIT_DataOwnerPtrList aList;
   selected( aList );
 
-  QValueList< QString > anEntryList;
-  Handle(SALOME_InteractiveObject) anIO;
-
   for ( SUIT_DataOwnerPtrList::const_iterator itr = aList.begin(); itr != aList.end(); ++itr )
   {
     const SalomeApp_DataOwner* owner = dynamic_cast<const SalomeApp_DataOwner*>( (*itr).operator->() );
+    if( owner )
+      lst.Append( owner->IO() );
+/*
 
     if ( owner && dynamic_cast<const SalomeApp_DataSubOwner*>( owner ) ) 
     { //get only subowners, insert into lst unique subowners (subowners with different entries)
@@ -93,6 +93,7 @@ void SalomeApp_SelectionMgr::selectedObjects( SALOME_ListIO& lst ) const
         }
       }
     }
+*/
   }
 }
 
index a8832913d4353e9e40329912b85a2209bf0e98a6..062128c3bbb6f59f3e963d2beaa035cf92e873b2 100644 (file)
@@ -21,8 +21,7 @@ SalomeApp_SVTKDataOwner
                           const TColStd_IndexedMapOfInteger& theIds,
                           Selection_Mode theMode,
                           SALOME_Actor* theActor):
-  SalomeApp_DataOwner(theIO->getEntry()),
-  myIO(theIO),
+  SalomeApp_DataOwner( theIO ),
   mySelectionMode(theMode),
   myActor(theActor)
 {
@@ -120,7 +119,7 @@ SalomeApp_VTKSelector
            const SUIT_DataOwner* aDataOwner = (*anIter).get();
            if(const SalomeApp_SVTKDataOwner* anOwner = dynamic_cast<const SalomeApp_SVTKDataOwner*>(aDataOwner)){
              aSelector->SetSelectionMode(anOwner->GetMode());
-             Handle(SALOME_InteractiveObject) anIO = anOwner->GetIO();
+             Handle(SALOME_InteractiveObject) anIO = anOwner->IO();
              aSelector->AddIObject(anIO);
              aSelector->AddOrRemoveIndex(anIO,anOwner->GetIds(),false);
              if(MYDEBUG) MESSAGE("VTKSelector::setSelection - SVTKDataOwner - "<<anIO->getEntry());
index 25c3dce7e0bb64962d71910e0ee8e5f8ae43d9af..389adcf47669d133286eac7d48daa5d93c8f6e70 100644 (file)
@@ -27,11 +27,6 @@ class SalomeApp_SVTKDataOwner : public SalomeApp_DataOwner
                             SALOME_Actor* theActor = NULL);
     virtual ~SalomeApp_SVTKDataOwner();
 
-    const Handle(SALOME_InteractiveObject)& GetIO() const
-    {
-      return myIO;
-    }
-
     const TColStd_IndexedMapOfInteger& GetIds() const
     {
       return myIds;
@@ -45,7 +40,6 @@ class SalomeApp_SVTKDataOwner : public SalomeApp_DataOwner
     SALOME_Actor* GetActor() const;
 
  protected:
-    Handle(SALOME_InteractiveObject) myIO;
     TColStd_IndexedMapOfInteger myIds;
     Selection_Mode mySelectionMode;
     vtkSmartPointer<SALOME_Actor> myActor;