Salome HOME
PAL10397 - Selection isn't cleared after apply
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_EditHypothesesDlg.cxx
index 16feafbc57a0c3eabfbccb78fbaa6e1cd527c800..c2d0185b6aaa9579d13034ca1d7510d5f3ccecaa 100644 (file)
@@ -115,7 +115,7 @@ SMESHGUI_EditHypothesesDlg::SMESHGUI_EditHypothesesDlg (SMESHGUI* theModule, con
     mySMESHGUI( theModule ),
     mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
 {
-    QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
+    QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
     if (!name)
       setName("SMESHGUI_EditHypothesesDlg");
     setCaption(tr("SMESH_EDIT_HYPOTHESES"));
@@ -350,6 +350,7 @@ bool SMESHGUI_EditHypothesesDlg::ClickOnApply()
   }
 
   UpdateControlState();
+  mySMESHGUI->updateObjBrowser();
 
   return aRes;
 }
@@ -769,11 +770,12 @@ void SMESHGUI_EditHypothesesDlg::InitGeom()
 //=================================================================================
 void SMESHGUI_EditHypothesesDlg::UpdateControlState()
 {
-  bool isEnabled = (!myMesh->_is_nil() && !myGeomShape->_is_nil() &&
-                    ListHypAssignation->count() && ListAlgoAssignation->count())
+  // asl the check of "count" is commented because of PAL9787
+  bool isEnabled = (!myMesh->_is_nil() && !myGeomShape->_is_nil() /*&&
+                    ListHypAssignation->count() && ListAlgoAssignation->count()*/ )
     ||
-      (!mySubMesh->_is_nil() && !myGeomShape->_is_nil() &&
-       (ListHypAssignation->count() || ListAlgoAssignation->count()));
+      (!mySubMesh->_is_nil() && !myGeomShape->_is_nil() /*&&
+       (ListHypAssignation->count() || ListAlgoAssignation->count())*/);
 
   buttonOk   ->setEnabled(myNbModification && isEnabled && !myImportedMesh);
   buttonApply->setEnabled(myNbModification && isEnabled && !myImportedMesh);