Salome HOME
Fix for Bug IPAL11055:
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_EditHypothesesDlg.cxx
index 16feafbc57a0c3eabfbccb78fbaa6e1cd527c800..9c16af4c12c6a42fab481c45971e3adb099d7d74 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"));
@@ -290,9 +290,6 @@ void SMESHGUI_EditHypothesesDlg::Init()
   connect(ListHypDefinition,  SIGNAL(doubleClicked(QListBoxItem*)), this, SLOT(addItem(QListBoxItem*)));
   connect(ListAlgoDefinition, SIGNAL(doubleClicked(QListBoxItem*)), this, SLOT(addItem(QListBoxItem*)));
 
-  int x, y;
-  mySMESHGUI->DefineDlgPosition(this, x, y);
-  this->move(x, y);
   this->show();
 
   LineEditC1A1->setFocus();
@@ -350,6 +347,7 @@ bool SMESHGUI_EditHypothesesDlg::ClickOnApply()
   }
 
   UpdateControlState();
+  mySMESHGUI->updateObjBrowser();
 
   return aRes;
 }
@@ -769,11 +767,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);