X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_MeshDlg.cxx;h=ad2adb52012d01396aaaaee9fdae95523baef115;hb=7c69e00bac6eb8b361a2dd2ba9d5f6f7aef9aa82;hp=f3a2719d41cfbbcb6e44b4b8f11b9ffb1f95a682;hpb=63a442b2c3cbc5e2155d83e86dfdb77d6961fab3;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx index f3a2719d4..ad2adb520 100644 --- a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 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 @@ -171,6 +171,7 @@ void SMESHGUI_MeshTab::addItem( const QString& txt, const int type, const int in if ( type <= AddHyp ) { myHypCombo[ type ]->addItem( txt, QVariant( index )); + myHypCombo[ type ]->setMaxVisibleItems( qMax( 10, myHypCombo[ type ]->count() ) ); } else { @@ -337,17 +338,24 @@ void SMESHGUI_MeshTab::setCurrentHyp( const int theId, const int theIndex ) } else // more than one additional hyp assigned { - // move a hyp from myHypCombo[ AddHyp ] to myAddHypList - for ( int i = 1, nb = myHypCombo[ AddHyp ]->count(); i < nb; ++i ) + if ( theIndex > 0 ) { - int curIndex = myHypCombo[ AddHyp ]->itemData( i ).toInt(); - if ( theIndex == curIndex ) + // move a hyp from myHypCombo[ AddHyp ] to myAddHypList + for ( int i = 1, nb = myHypCombo[ AddHyp ]->count(); i < nb; ++i ) { - addItem( myHypCombo[ AddHyp ]->itemText( i ), theId, theIndex ); - myHypCombo[ AddHyp ]->removeItem( i ); - break; + int curIndex = myHypCombo[ AddHyp ]->itemData( i ).toInt(); + if ( theIndex == curIndex ) + { + addItem( myHypCombo[ AddHyp ]->itemText( i ), theId, theIndex ); + myHypCombo[ AddHyp ]->removeItem( i ); + break; + } } } + else + { + myAddHypList->clear(); + } } } @@ -616,12 +624,32 @@ SMESHGUI_MeshDlg::SMESHGUI_MeshDlg( const bool theToCreate, const bool theIsMesh objectWg( Mesh, Btn )->hide(); objectWg( Geom, Btn )->hide(); } + setTitile( theToCreate, theIsMesh ); } SMESHGUI_MeshDlg::~SMESHGUI_MeshDlg() { } +//================================================================================ +/*! + * \brief Set dialog title + */ +//================================================================================ + +void SMESHGUI_MeshDlg::setTitile( const bool theToCreate, const bool theIsMesh ) +{ + if ( theToCreate ) + { + setWindowTitle( tr( theIsMesh ? "CREATE_MESH" : "CREATE_SUBMESH" )); + } + else + { + setWindowTitle( tr( theIsMesh ? "EDIT_MESH" : "EDIT_SUBMESH") ); + } + +} + //================================================================================ /*! * \brief Gets tab with given id