Salome HOME
Update copyright information
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MultiEditDlg.cxx
index 70bf3f61d617cb71ef18e096396c373dfe7a04b4..b1d62fb53bb14ca16fc7566fb8cc60a8fd177229 100755 (executable)
@@ -1,6 +1,6 @@
-//  SMESH SMESHGUI : GUI for SMESH component
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
 //  This library is free software; you can redistribute it and/or
 //  License along with this library; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+//  SMESH SMESHGUI : GUI for SMESH component
 //  File   : SMESHGUI_MultiEditDlg.cxx
 //  Author : Sergey LITONIN
 //  Module : SMESH
-
+//
 #include "SMESHGUI_MultiEditDlg.h"
 
 #include "SMESHGUI.h"
@@ -233,9 +232,9 @@ QFrame* SMESHGUI_MultiEditDlg::createButtonFrame (QWidget* theParent)
   QFrame* aFrame = new QFrame (theParent);
   aFrame->setFrameStyle(QFrame::Box | QFrame::Sunken);
 
-  myOkBtn     = new QPushButton (tr("SMESH_BUT_OK"   ), aFrame);
   myApplyBtn  = new QPushButton (tr("SMESH_BUT_APPLY"), aFrame);
   myCloseBtn  = new QPushButton (tr("SMESH_BUT_CLOSE"), aFrame);
+  myOkBtn     = new QPushButton (tr("SMESH_BUT_APPLY_AND_CLOSE"), aFrame);
   myHelpBtn   = new QPushButton (tr("SMESH_BUT_HELP"), aFrame);
 
   QSpacerItem* aSpacer = new QSpacerItem (0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
@@ -543,7 +542,7 @@ void SMESHGUI_MultiEditDlg::onSelectionDone()
     } else {
       aNameEdit->clear();
     }
-  } else if (nbSel == 1) {
+  } else if (nbSel > 0) {
     QString aListStr = "";
     Handle(SALOME_InteractiveObject) anIO = aList.First();
     int aNbItems = SMESH::GetNameOfSelectedElements(mySelector,anIO,aListStr);
@@ -559,7 +558,7 @@ void SMESHGUI_MultiEditDlg::onSelectionDone()
     myMesh = SMESH::GetMeshByIO(anIO);
   }
 
-  if (nbSel == 1) {
+  if (nbSel > 0) {
     myActor = SMESH::FindActorByEntry(aList.First()->getEntry());
     if (!myActor)
       myActor = SMESH::FindActorByObject(myMesh);
@@ -687,7 +686,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn()
   TColStd_IndexedMapOfInteger toBeAdded;
 
   if (!mySubmeshChk->isChecked() && !myGroupChk->isChecked()) {
-    if (nbSelected == 1)
+    if (nbSelected > 0)
       mySelector->GetIndex(aList.First(),toBeAdded);
   } else if (mySubmeshChk->isChecked()) {
     SALOME_ListIteratorOfListIO anIter(aList);
@@ -764,7 +763,7 @@ void SMESHGUI_MultiEditDlg::updateButtons()
 
   if (isToAll ||
       myMesh->_is_nil() ||
-      aList.Extent() != 1 ||
+      aList.Extent() < 1 ||
       (SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(aList.First())->_is_nil() &&
        SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(aList.First())->_is_nil() &&
        SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(aList.First())->_is_nil()))