X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_SmoothingDlg.cxx;h=101e153d68dffe481e4e357b3a7fb16be19b982b;hp=5e812940acdc11dca0c63dc5e0e686b94e8c1b95;hb=25dc346fe72b1e1e750264b5db01c295e0c051d5;hpb=3506ddb84a93b342983f0992d23a8c3db5425848 diff --git a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx index 5e812940a..101e153d6 100644 --- a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx @@ -358,8 +358,7 @@ void SMESHGUI_SmoothingDlg::ClickOnApply() 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); @@ -370,7 +369,7 @@ void SMESHGUI_SmoothingDlg::ClickOnApply() 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(); @@ -538,7 +537,6 @@ void SMESHGUI_SmoothingDlg::SelectionIntoArgument() if (myBusy) return; // clear - myActor = 0; QString aString = ""; myBusy = true; @@ -547,6 +545,7 @@ void SMESHGUI_SmoothingDlg::SelectionIntoArgument() myNbOkElements = 0; buttonOk->setEnabled(false); buttonApply->setEnabled(false); + myActor = 0; } myBusy = false; @@ -639,7 +638,7 @@ void SMESHGUI_SmoothingDlg::SelectionIntoArgument() else if (myEditCurrentArgument == LineEditNodes) myNbOkNodes = true; - if (myNbOkElements) { + if (myNbOkElements && (myNbOkNodes || LineEditNodes->text().stripWhiteSpace().isEmpty())) { buttonOk->setEnabled(true); buttonApply->setEnabled(true); } @@ -671,10 +670,12 @@ void SMESHGUI_SmoothingDlg::SetEditCurrentArgument() 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();