Salome HOME
Fix for Bug PAL7766 ( An exception appears during construction of a group in the...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_GroupDlg.cxx
index ed7295a118ce4c509100660c738021af0a52acfc..aa3a15cbda1887e3e11e2447ed10742f8f422f19 100644 (file)
@@ -498,6 +498,10 @@ void SMESHGUI_GroupDlg::onGrpTypeChanged(int id)
 //=================================================================================
 void SMESHGUI_GroupDlg::setSelectionMode(int theMode)
 {
+  // PAL7314
+  if (myMesh->_is_nil())
+    return;
+  
   if (mySelectionMode != theMode) {
     mySelection->ClearIObjects();
     mySelection->ClearFilters();
@@ -1338,6 +1342,7 @@ void SMESHGUI_GroupDlg::onClose()
 //=======================================================================
 void SMESHGUI_GroupDlg::onDeactivate()
 {
+  mySMESHGUI->ResetState();
   setEnabled( false );
 }
 
@@ -1352,6 +1357,8 @@ void SMESHGUI_GroupDlg::enterEvent( QEvent* )
     setEnabled( true );
     mySelectionMode = -1;
     setSelectionMode( myTypeId );
+    mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ;
+    mySMESHGUI->SetState(800);
   }
 }