Salome HOME
First stable version after merging with V3_2_2
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MeshPatternDlg.cxx
index b0d9f1e76a9deb64e3dbbc628503b957df686529..8d72e0ede6d90ce4d8a0b9c2402b36237de7e5b0 100755 (executable)
@@ -383,6 +383,13 @@ bool SMESHGUI_MeshPatternDlg::isValid (const bool theMess)
     return false;
   }
 
+  if ( myName->text()=="" ) {
+    if (theMess)
+      QMessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
+                               tr("SMESHGUI_INVALID_PARAMETERS"), QMessageBox::Ok);
+    return false;
+  }
+
   return true;
 }
 
@@ -1367,3 +1374,20 @@ int SMESHGUI_MeshPatternDlg::getNode (bool second) const
 {
   return second ? myNode2->value() - 1 : myNode1->value() - 1;
 }
+
+//=================================================================================
+// function : keyPressEvent()
+// purpose  :
+//=================================================================================
+void SMESHGUI_MeshPatternDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Key_F1 )
+    {
+      e->accept();
+      onHelp();
+    }
+}