]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
if id passed to clearSelection is -1, then all object selection widgets will be cleared
authorasl <asl@opencascade.com>
Thu, 7 Jul 2005 08:44:50 +0000 (08:44 +0000)
committerasl <asl@opencascade.com>
Thu, 7 Jul 2005 08:44:50 +0000 (08:44 +0000)
src/SalomeApp/SalomeApp_Dialog.cxx

index dc3039c418ca23a3c5571f9105be1cedf824f66f..ee24de4628745257fd11fcc049349879a38662b0 100644 (file)
@@ -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