From: asl Date: Thu, 7 Jul 2005 08:44:50 +0000 (+0000) Subject: if id passed to clearSelection is -1, then all object selection widgets will be cleared X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ddf6c50fcc9d256921b51180c064d50e5723565a;p=modules%2Fgui.git if id passed to clearSelection is -1, then all object selection widgets will be cleared --- 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