if (mySMESHGUI->isActiveStudyLocked())
return;
- if (myNbOkElements &&
- (myNbOkNodes || LineEditNodes->text().stripWhiteSpace().isEmpty())) {
+ if (myNbOkElements && (myNbOkNodes || LineEditNodes->text().stripWhiteSpace().isEmpty())) {
QStringList aListElementsId = QStringList::split(" ", myElementsId, false);
QStringList aListNodesId = QStringList::split(" ", LineEditNodes->text(), false);
for (int i = 0; i < aListElementsId.count(); i++)
anElementsId[i] = aListElementsId[i].toInt();
- if (myNbOkNodes) {
+ if ( myNbOkNodes && aListNodesId.count() > 0 ) {
aNodesId->length(aListNodesId.count());
for (int i = 0; i < aListNodesId.count(); i++)
aNodesId[i] = aListNodesId[i].toInt();
if (myBusy) return;
// clear
- myActor = 0;
QString aString = "";
myBusy = true;
myNbOkElements = 0;
buttonOk->setEnabled(false);
buttonApply->setEnabled(false);
+ myActor = 0;
}
myBusy = false;
else if (myEditCurrentArgument == LineEditNodes)
myNbOkNodes = true;
- if (myNbOkElements) {
+ if (myNbOkElements && (myNbOkNodes || LineEditNodes->text().stripWhiteSpace().isEmpty())) {
buttonOk->setEnabled(true);
buttonApply->setEnabled(true);
}
aViewWindow->SetSelectionMode(CellSelection);
}
} else if (send == SelectNodesButton) {
+ LineEditNodes->clear();
myEditCurrentArgument = LineEditNodes;
SMESH::SetPointRepresentation(true);
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) {
aViewWindow->SetSelectionMode(NodeSelection);
+ }
}
myEditCurrentArgument->setFocus();