From 29923cc5127985801833bf89db7d072a762f6152 Mon Sep 17 00:00:00 2001 From: enk Date: Fri, 27 Jan 2006 08:47:03 +0000 Subject: [PATCH] Fix for Bug IPAL11386: HangUp at attempt to create polyhedral volume --- src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx index 3635a87d1..5eb0eaf93 100644 --- a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx @@ -638,7 +638,8 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::onTextChange(const QString& theNewText) buttonOk->setEnabled( false ); buttonApply->setEnabled( false ); } - displaySimulation(); + if(aListId.count()>1) + displaySimulation(); } } } @@ -692,9 +693,10 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::SelectionIntoArgument() // get selected nodes/faces QString aString = ""; + int anbNodes=0,aNbFaces=0; switch(GetConstructorId()){ case 0:{ - int anbNodes = SMESH::GetNameOfSelectedNodes(mySelector, myActor->getIO(), aString); + anbNodes = SMESH::GetNameOfSelectedNodes(mySelector, myActor->getIO(), aString); if (anbNodes >= 3) AddButton->setEnabled(true); else if (anbNodes < 3){ @@ -707,7 +709,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::SelectionIntoArgument() } case 1:{ // get selected faces - int aNbFaces = SMESH::GetNameOfSelectedElements(mySelector, myActor->getIO(), aString); + aNbFaces = SMESH::GetNameOfSelectedElements(mySelector, myActor->getIO(), aString); if (aNbFaces<=1){ buttonOk->setEnabled( false ); buttonApply->setEnabled( false ); @@ -725,8 +727,8 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::SelectionIntoArgument() } default: return; } - - displaySimulation(); + if(anbNodes>2 || aNbFaces>1) + displaySimulation(); } //======================================================================= -- 2.39.2