X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_MultiEditDlg.cxx;h=b1d62fb53bb14ca16fc7566fb8cc60a8fd177229;hb=85c0f447729c6ed2f90d83051d79a4d308596a2e;hp=70bf3f61d617cb71ef18e096396c373dfe7a04b4;hpb=79b1ac2b6df9117f16f11d444b1f165d477a1813;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index 70bf3f61d..b1d62fb53 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -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 @@ -17,14 +17,13 @@ // 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(aList.First())->_is_nil() && SMESH::IObjectToInterface(aList.First())->_is_nil() && SMESH::IObjectToInterface(aList.First())->_is_nil()))