From ddf6c50fcc9d256921b51180c064d50e5723565a Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 7 Jul 2005 08:44:50 +0000 Subject: [PATCH] if id passed to clearSelection is -1, then all object selection widgets will be cleared --- src/SalomeApp/SalomeApp_Dialog.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/SalomeApp/SalomeApp_Dialog.cxx b/src/SalomeApp/SalomeApp_Dialog.cxx index dc3039c41..ee24de462 100644 --- a/src/SalomeApp/SalomeApp_Dialog.cxx +++ b/src/SalomeApp/SalomeApp_Dialog.cxx @@ -125,7 +125,15 @@ bool SalomeApp_Dialog::hasSelection( const int id ) const void SalomeApp_Dialog::clearSelection( const int id ) { - if( myObjects.contains( id ) ) + if( id==-1 ) + { + ObjectMap::const_iterator anIt = myObjects.begin(), + aLast = myObjects.end(); + for( ; anIt!=aLast; anIt++ ) + clearSelection( anIt.key() ); + } + + else if( myObjects.contains( id ) ) { myObjects[ id ].myIds.clear(); myObjects[ id ].myTypes.clear(); @@ -400,7 +408,7 @@ void SalomeApp_Dialog::setObjectPixmap( const QString& section, const QString& f bool SalomeApp_Dialog::multipleSelection( const int id ) const { - return nameIndication( id )==OneName; + return nameIndication( id )!=OneName; } SalomeApp_Dialog::NameIndication SalomeApp_Dialog::nameIndication( const int id ) const -- 2.39.2