Salome HOME
PAL13639 (EDF PAL 317 : SMESH : Create "0D Hypothesis")
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MeshDlg.cxx
index e05e2022df3ef9fe44b8edaed9bc4761a9aa68d0..33d2e6485f6eaf4c13943600fc337944b0c99615 100644 (file)
@@ -15,7 +15,7 @@
 // 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.salome-platform.org/
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 /**
 *  SMESH SMESHGUI
@@ -391,12 +391,14 @@ SMESHGUI_MeshDlg::SMESHGUI_MeshDlg( const bool theToCreate, const bool theIsMesh
   // Create tab widget
   
   myTabWg = new QTabWidget( mainFrame() );
+  myTabs[ Dim0D ] = new SMESHGUI_MeshTab( myTabWg );
   myTabs[ Dim1D ] = new SMESHGUI_MeshTab( myTabWg );
   myTabs[ Dim2D ] = new SMESHGUI_MeshTab( myTabWg );
   myTabs[ Dim3D ] = new SMESHGUI_MeshTab( myTabWg );
   myTabWg->addTab( myTabs[ Dim3D ], tr( "DIM_3D" ) );
   myTabWg->addTab( myTabs[ Dim2D ], tr( "DIM_2D" ) );
   myTabWg->addTab( myTabs[ Dim1D ], tr( "DIM_1D" ) );
+  myTabWg->addTab( myTabs[ Dim0D ], tr( "DIM_0D" ) );
 
   // Hypotheses Sets
   myHypoSetPopup = new QPopupMenu();
@@ -454,7 +456,7 @@ SMESHGUI_MeshDlg::~SMESHGUI_MeshDlg()
 //================================================================================
 SMESHGUI_MeshTab* SMESHGUI_MeshDlg::tab( const int theId ) const
 {
-  return ( theId >= Dim1D && theId <= Dim3D ? myTabs[ theId ] : 0 );
+  return ( theId >= Dim0D && theId <= Dim3D ? myTabs[ theId ] : 0 );
 }
 
 //================================================================================
@@ -465,6 +467,7 @@ SMESHGUI_MeshTab* SMESHGUI_MeshDlg::tab( const int theId ) const
 void SMESHGUI_MeshDlg::reset()
 {
   clearSelection();
+  myTabs[ Dim0D ]->reset();
   myTabs[ Dim1D ]->reset();
   myTabs[ Dim2D ]->reset();
   myTabs[ Dim3D ]->reset();
@@ -489,8 +492,8 @@ void SMESHGUI_MeshDlg::setCurrentTab( const int theId  )
 
 void SMESHGUI_MeshDlg::setMaxHypoDim( const int maxDim )
 {
-  const int DIM = maxDim - 1;
-  for ( int dim = Dim1D; dim <= Dim3D; ++dim ) {
+  const int DIM = maxDim;
+  for ( int dim = Dim0D; dim <= Dim3D; ++dim ) {
     bool enable = ( dim <= DIM );
     if ( !enable )
       myTabs[ dim ]->reset();