Salome HOME
IPAL54529: Hexahedron(ijk) fails on a block with composite sides if Viscous Layers...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MeshDlg.cxx
index adc8a64bf1e17c1474c09e108fbbe95e8bc5bb85..a1ee4ec9f25155bd38dbf39655f9181922fe8874 100644 (file)
@@ -828,6 +828,17 @@ bool SMESHGUI_MeshDlg::isTabEnabled(const int theTabId) const
   return myTabWg->isTabEnabled( myTabWg->indexOf( myTabs[ theTabId ] ) );
 }
 
+//================================================================================
+/*!
+ * \brief Return index of a current tab
+ * \return tab ID
+ */
+//================================================================================
+int SMESHGUI_MeshDlg::currentTab() const
+{
+  return Dim3D - myTabWg->currentIndex();
+}
+
 //================================================================================
 /*!
  * \brief SLOT called when a Geom selection button is clicked
@@ -900,5 +911,8 @@ int SMESHGUI_MeshDlg::currentMeshType( )
 //================================================================================
 void SMESHGUI_MeshDlg::setCurrentMeshType( const int theIndex )
 {
-  myMeshType->setCurrentIndex( theIndex );
+  if ( theIndex < myMeshType->count() )
+    myMeshType->setCurrentIndex( theIndex );
+  else
+    myMeshType->setCurrentIndex( 0 );
 }