Salome HOME
DCQ:prepare 2.0.0
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_NodesDlg.cxx
index 16bfc5dc797873051efb43bd85880e1c3a463db8..5ae62afc1e539a30836af819824cf36706336dc5 100644 (file)
@@ -1,13 +1,32 @@
-using namespace std;
-//  File      : SMESHGUI_NodesDlg.cxx
-//  Created   : Tue May 14 21:35:46 2002
-//  Author    : Nicolas REJNERI
-
-//  Project   : SALOME
-//  Module    : SMESH
-//  Copyright : Open CASCADE 2002
+//  SMESH SMESHGUI : GUI for SMESH component
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SMESHGUI_NodesDlg.cxx
+//  Author : Nicolas REJNERI
+//  Module : SMESH
 //  $Header$
 
+using namespace std;
 #include "SMESHGUI_NodesDlg.h"
 #include "SMESHGUI.h"
 #include "SMESHGUI_SpinBox.h"
@@ -265,7 +284,7 @@ void SMESHGUI_NodesDlg::ClickOnApply()
 //=======================================================================
 void SMESHGUI_NodesDlg::ClickOnCancel()
 {
-  QAD_Application::getDesktop()->SetSelectionMode( 4 );
+  QAD_Application::getDesktop()->SetSelectionMode( ActorSelection );
   disconnect( mySelection, 0, this, 0 );
   myMeshGUI->ResetState() ;
   myMeshGUI->EraseSimulationActors() ;
@@ -297,12 +316,12 @@ void SMESHGUI_NodesDlg::SelectionIntoArgument()
     return ;
   }
   
-  if ( mySelection->SelectionMode() != 1 ) {
+  if ( mySelection->SelectionMode() != NodeSelection ) {
     SpinBox_X->SetValue(0.0) ;
     SpinBox_Y->SetValue(0.0) ;
     SpinBox_Z->SetValue(0.0) ;
     QAD_MessageBox::warn1 ( QAD_Application::getDesktop(), tr ("SMESH_WRN_WARNING"),
-                           tr ("SMESH_WRN_SELECTIONMODE_NODES"), tr ("SMESH_BUT_YES") );
+                           tr ("SMESH_WRN_SELECTIONMODE_NODES"), tr ("SMESH_BUT_OK") );
     return;
   }
 
@@ -326,7 +345,7 @@ void SMESHGUI_NodesDlg::SelectionIntoArgument()
 
     Standard_Boolean result;
     SMESH_Actor* ac = myMeshGUI->FindActor( myMesh, result, true );
-    vtkUnstructuredGrid* ugrid = vtkUnstructuredGrid::SafeDownCast( ac->DataSource );
+    vtkUnstructuredGrid* ugrid = vtkUnstructuredGrid::SafeDownCast( ac->GetUnstructuredGrid() );
     float *p0 = ugrid->GetPoint(idNodes[0]);
 
     SpinBox_X->SetValue( p0[0] ) ;