From: asl Date: Tue, 31 May 2005 11:14:21 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: T3_0_0_a1~60 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d1de867bb6dc574c280e97271d10e145a89db3fc;p=modules%2Fgui.git *** empty log message *** --- diff --git a/src/SalomeApp/SalomeApp_OBSelector.cxx b/src/SalomeApp/SalomeApp_OBSelector.cxx index 025e337bf..ab8b10990 100644 --- a/src/SalomeApp/SalomeApp_OBSelector.cxx +++ b/src/SalomeApp/SalomeApp_OBSelector.cxx @@ -36,7 +36,11 @@ void SalomeApp_OBSelector::getSelection( SUIT_DataOwnerPtrList& list ) const { SalomeApp_DataObject* obj = dynamic_cast( 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 ) ) ); + } } } diff --git a/src/SalomeApp/SalomeApp_OCCSelector.cxx b/src/SalomeApp/SalomeApp_OCCSelector.cxx index 839b0dec0..b9d4d5af3 100644 --- a/src/SalomeApp/SalomeApp_OCCSelector.cxx +++ b/src/SalomeApp/SalomeApp_OCCSelector.cxx @@ -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 ) diff --git a/src/SalomeApp/SalomeApp_SelectionMgr.cxx b/src/SalomeApp/SalomeApp_SelectionMgr.cxx index 029323342..49a5b1584 100644 --- a/src/SalomeApp/SalomeApp_SelectionMgr.cxx +++ b/src/SalomeApp/SalomeApp_SelectionMgr.cxx @@ -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( (*itr).operator->() ); + if( owner ) + lst.Append( owner->IO() ); +/* if ( owner && dynamic_cast( 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 } } } +*/ } } diff --git a/src/SalomeApp/SalomeApp_VTKSelector.cxx b/src/SalomeApp/SalomeApp_VTKSelector.cxx index a8832913d..062128c3b 100644 --- a/src/SalomeApp/SalomeApp_VTKSelector.cxx +++ b/src/SalomeApp/SalomeApp_VTKSelector.cxx @@ -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(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 - "<getEntry()); diff --git a/src/SalomeApp/SalomeApp_VTKSelector.h b/src/SalomeApp/SalomeApp_VTKSelector.h index 25c3dce7e..389adcf47 100644 --- a/src/SalomeApp/SalomeApp_VTKSelector.h +++ b/src/SalomeApp/SalomeApp_VTKSelector.h @@ -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 myActor;