-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019 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
//================================================================================
/*!
- * \brief Sets curent tab
+ * \brief Sets current tab
*/
//================================================================================
void SMESHGUI_MeshDlg::setCurrentTab( const int theId )
//================================================================================
/*!
* \brief Enable/disable tabs
- * \param int - maximum possible dimention
+ * \param int - maximum possible dimension
*/
//================================================================================
void SMESHGUI_MeshDlg::setMaxHypoDim( const int maxDim )
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
//================================================================================
/*!
- * \brief SLOT called when a item of Geom selection popup is choosen
+ * \brief SLOT called when a item of Geom selection popup is chosen
*/
//================================================================================
void SMESHGUI_MeshDlg::onGeomPopup( QAction* a )
//================================================================================
void SMESHGUI_MeshDlg::setCurrentMeshType( const int theIndex )
{
- myMeshType->setCurrentIndex( theIndex );
+ if ( theIndex < myMeshType->count() )
+ myMeshType->setCurrentIndex( theIndex );
+ else
+ myMeshType->setCurrentIndex( 0 );
}