Salome HOME
Fix for the bug IPAL21971: Polyhedron problems BR_WIN_INDUS_514
authorana <ana@opencascade.com>
Mon, 17 Jan 2011 08:21:11 +0000 (08:21 +0000)
committerana <ana@opencascade.com>
Mon, 17 Jan 2011 08:21:11 +0000 (08:21 +0000)
src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx

index 864537e8464256f6e7d42c6cd2b090704de0932c..3e9025294254eabcf6e068f848516f94e904523b 100644 (file)
@@ -342,7 +342,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::Init()
   connect(SelectElementsButton, SIGNAL( clicked() ), SLOT( SetEditCurrentArgument() ) );
   connect(LineEditElements, SIGNAL( textChanged(const QString&) ), SLOT(onTextChange(const QString&)));
 
-  connect(myFacesByNodes, SIGNAL(selectionChanged()), this, SLOT(onListSelectionChanged()));
+  connect(myFacesByNodes, SIGNAL(itemSelectionChanged()), this, SLOT(onListSelectionChanged()));
   connect(AddButton, SIGNAL(clicked()), this, SLOT(onAdd()));
   connect(RemoveButton, SIGNAL(clicked()), this, SLOT(onRemove()));
   
@@ -577,6 +577,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
 
       SMESHGUI::Modified();
     }
+    myFacesByNodes->clear();
 }
 
 //=================================================================================
@@ -1089,8 +1090,10 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::onAdd()
       myNbOkElements = 1;
       myEditCurrentArgument->clear();
       AddButton->setEnabled(false);
-      buttonOk->setEnabled( true );
-      if(myFacesByNodes->count()>1) buttonApply->setEnabled( true );
+      if(myFacesByNodes->count()>1) {
+        buttonApply->setEnabled( true );
+        buttonOk->setEnabled( true );
+      }
     }
   busy = false;
   onListSelectionChanged();