- if (nbSel != 1)
- return;
-
- Handle(SALOME_InteractiveObject) anIO = aList.First();
- myMesh = SMESH::GetMeshByIO(anIO);
- if (myMesh->_is_nil())
- return;
-
- myActor = SMESH::FindActorByEntry(anIO->getEntry());
- if (!myActor)
- return;
-
- // get selected nodes
-
- QString aString = "";
- int nbNodes = SMESH::GetNameOfSelectedNodes(mySelector,anIO,aString);
- if(nbNodes < 1)
- return;
- myBusy = true;
- myEditCurrentArgument->setText(aString);
- myBusy = false;
-
- // OK
-
- myNbOkNodes = true;
-
- buttonOk->setEnabled(true);
- buttonApply->setEnabled(true);
+ if (nbSel == 1) {
+
+ Handle(SALOME_InteractiveObject) anIO = aList.First();
+ myMesh = SMESH::GetMeshByIO(anIO);
+
+ if (!myMesh->_is_nil()) {
+
+ myActor = SMESH::FindActorByEntry(anIO->getEntry());
+ if (myActor) {
+
+ // get selected nodes
+ QString aString = "";
+ int nbNodes = SMESH::GetNameOfSelectedNodes(mySelector,anIO,aString);
+ if (nbNodes > 0) {
+ myBusy = true;
+ myEditCurrentArgument->setText(aString);
+ myBusy = false;
+
+ // OK
+
+ myNbOkNodes = nbNodes;
+ } // if (nbNodes > 0)
+ } // if (myActor)
+ } // if (!myMesh->_is_nil())
+ } // if (nbSel == 1)
+
+ updateButtons();