X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSMESHGUI%2FSMESHGUI_MeshDlg.cxx;h=d2fb709892f82c193a752c33f770b6f1547b155f;hb=8fd99042466691b6a1418142764674228c885b65;hp=a3446f2997310181f4820abfd354d6b942d8e628;hpb=7af78cc3d0b95ec53ab6ec83a92b1df4a9fb6b2a;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx index a3446f299..d2fb70989 100644 --- a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2010 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 @@ -19,6 +19,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SMESH SMESHGUI : GUI for SMESH component // File : SMESHGUI_MeshDlg.cxx // Author : Sergey LITONIN, Open CASCADE S.A.S. @@ -478,9 +479,13 @@ void SMESHGUI_MeshDlg::setMaxHypoDim( const int maxDim ) const int DIM = maxDim; for ( int dim = Dim0D; dim <= Dim3D; ++dim ) { bool enable = ( dim <= DIM ); - if ( !enable ) + if ( !enable ) { myTabs[ dim ]->reset(); - myTabWg->setTabEnabled( myTabWg->indexOf( myTabs[ dim ] ), enable ); + disableTab( dim ); + } + else { + enableTab( dim ); + } } // deselect desabled tab if ( !myTabWg->isTabEnabled( myTabWg->currentIndex() ) ) @@ -564,6 +569,7 @@ void SMESHGUI_MeshDlg::setGeomPopupEnabled( const bool enable ) //================================================================================ void SMESHGUI_MeshDlg::disableTab(const int theTabId) { myTabWg->setTabEnabled( myTabWg->indexOf( myTabs[ theTabId ] ), false ); + if ( theTabId == Dim3D ) myHypoSetButton->setEnabled( false ); } //================================================================================ @@ -574,6 +580,10 @@ void SMESHGUI_MeshDlg::disableTab(const int theTabId) { //================================================================================ void SMESHGUI_MeshDlg::enableTab(const int theTabId) { myTabWg->setTabEnabled( myTabWg->indexOf( myTabs[ theTabId ] ), true ); + if ( theTabId == Dim3D ) { + QMenu* aHypoSetPopup = myHypoSetButton->menu(); + myHypoSetButton->setEnabled( aHypoSetPopup && !aHypoSetPopup->actions().isEmpty() ); + } } //================================================================================