Salome HOME
22359: Body Fitting algorithm: grid orientation
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_SingleEditDlg.cxx
index f93ce95565ca740eaef14420091c6bd91cf8bf83..8059552fe5d1b6808061459f136aaecdd659d7df 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -215,14 +215,14 @@ void SMESHGUI_SingleEditDlg::Init()
 
   // main buttons
   connect(myOkBtn,    SIGNAL(clicked()), SLOT(onOk()));
-  connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
+  connect(myCloseBtn, SIGNAL(clicked()), SLOT(reject()));
   connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
   connect(myHelpBtn,  SIGNAL(clicked()), SLOT(onHelp()));
 
   // selection and SMESHGUI
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
   connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
-  connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
+  connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
   connect(myEdge, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
 
   myOkBtn->setEnabled(false);
@@ -244,14 +244,14 @@ void SMESHGUI_SingleEditDlg::Init()
 void SMESHGUI_SingleEditDlg::onOk()
 {
   if (onApply())
-    onClose();
+    reject();
 }
 
 //=======================================================================
-// name    : onClose()
+// name    : reject()
 // Purpose : SLOT called when "Close" button pressed. Close dialog
 //=======================================================================
-void SMESHGUI_SingleEditDlg::onClose()
+void SMESHGUI_SingleEditDlg::reject()
 {
   if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
     aViewWindow->SetSelectionMode(ActorSelection);
@@ -259,7 +259,7 @@ void SMESHGUI_SingleEditDlg::onClose()
   disconnect(mySelectionMgr, 0, this, 0);
   disconnect(mySMESHGUI, 0, this, 0);
   mySMESHGUI->ResetState();
-  reject();
+  QDialog::reject();
 }
 
 //=================================================================================
@@ -305,7 +305,7 @@ static bool findTriangles (const SMDS_MeshNode *    theNode1,
   SMDS_ElemIteratorPtr it = theNode1->GetInverseElementIterator();
   while (it->more()) {
     const SMDS_MeshElement* elem = it->next();
-    if (elem->GetType() == SMDSAbs_Face && elem->NbNodes() == 3)
+    if (elem->GetType() == SMDSAbs_Face && elem->NbCornerNodes() == 3)
       emap.insert(elem);
   }
   it = theNode2->GetInverseElementIterator();
@@ -458,25 +458,6 @@ void SMESHGUI_SingleEditDlg::enterEvent (QEvent*)
   }
 }
 
-//=================================================================================
-// function : closeEvent()
-// purpose  :
-//=================================================================================
-void SMESHGUI_SingleEditDlg::closeEvent (QCloseEvent*)
-{
-  onClose();
-}
-
-//=======================================================================
-//function : hideEvent()
-//purpose  : caused by ESC key
-//=======================================================================
-void SMESHGUI_SingleEditDlg::hideEvent (QHideEvent*)
-{
-  if (!isMinimized())
-    onClose();
-}
-
 //=================================================================================
 // function : onApply()
 // purpose  : SLOT. Called when apply button is pressed