From: asl Date: Tue, 7 Jun 2005 10:42:25 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: T3_0_0_a2~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=488289e34b8ecfb45b6c09d45bc6ee8327720b5a;p=modules%2Fgui.git *** empty log message *** --- diff --git a/src/SalomeApp/SalomeApp_VTKSelector.cxx b/src/SalomeApp/SalomeApp_VTKSelector.cxx index 3b3a8a304..21e0bfa80 100644 --- a/src/SalomeApp/SalomeApp_VTKSelector.cxx +++ b/src/SalomeApp/SalomeApp_VTKSelector.cxx @@ -10,11 +10,11 @@ #include "utilities.h" -#ifdef _DEBUG_ +//#ifdef _DEBUG_ +static int MYDEBUG = 1; +/*#else static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif +#endif*/ SalomeApp_SVTKDataOwner ::SalomeApp_SVTKDataOwner( const Handle(SALOME_InteractiveObject)& theIO, @@ -134,7 +134,18 @@ SalomeApp_VTKSelector } } // To remove IOs, which is not selected. - SALOME_ListIO aRemoveList; + QMap< QString, Handle( SALOME_InteractiveObject )> toRemove; + SALOME_ListIteratorOfListIO anIt( aStoredList ); + for( ; anIt.More(); anIt.Next() ) + if( !anIt.Value().IsNull() ) + toRemove[ anIt.Value()->getEntry() ] = anIt.Value(); + + anIt = SALOME_ListIteratorOfListIO(anAppendList); + for( ; anIt.More(); anIt.Next() ) + toRemove.remove( anIt.Value()->getEntry() ); + + +/* SALOME_ListIO aRemoveList; SALOME_ListIteratorOfListIO anAppendListIter(anAppendList); for(; anAppendListIter.More(); anAppendListIter.Next()){ Handle(SALOME_InteractiveObject) anIO = anAppendListIter.Value(); @@ -145,10 +156,13 @@ SalomeApp_VTKSelector } } } - SALOME_ListIteratorOfListIO aRemoveListIter(aRemoveList); - for(; aRemoveListIter.More(); aRemoveListIter.Next()){ - aSelector->RemoveIObject(aRemoveListIter.Value()); - } + SALOME_ListIteratorOfListIO aRemoveListIter(aRemoveList);*/ + + QMap< QString, Handle( SALOME_InteractiveObject )>::const_iterator RIt = toRemove.begin(), + REnd = toRemove.end(); + for( ; RIt!=REnd; RIt++ ) + aSelector->RemoveIObject( RIt.data() ); + aView->onSelectionChanged(); } }