X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSMESHGUI%2FSMESHGUI_AddMeshElementDlg.cxx;h=0de69046ad5285ebdf416e6208cbbdd9b1d9888e;hb=493747e8ea338a2d88204a5f12ba924d72ecbb5b;hp=6e25fd08fb1b22c8a8078c26bdafbc69d9648d0d;hpb=ef8432633e57037dcd8df55503e62b08069c9190;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx index 6e25fd08f..0de69046a 100644 --- a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx @@ -243,7 +243,8 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI* theModule, int nbNodes ) : QDialog( SMESH::GetDesktop( theModule ) ), mySMESHGUI( theModule ), - mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ) + mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ), + myBusy ( false ) { setModal( false ); setAttribute( Qt::WA_DeleteOnClose, true ); @@ -371,6 +372,7 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI* theModule, TextLabel_GroupName = new QLabel( tr( "SMESH_GROUP" ), GroupGroups ); ComboBox_GroupName = new QComboBox( GroupGroups ); ComboBox_GroupName->setEditable( true ); + ComboBox_GroupName->setInsertPolicy( QComboBox::NoInsert ); GroupGroupsLayout->addWidget( TextLabel_GroupName ); GroupGroupsLayout->addWidget( ComboBox_GroupName, 1 ); @@ -496,7 +498,7 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply() if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) ) idx = i; } - if ( idx > 0 ) { + if ( idx > 0 && idx < myGroups.count() ) { SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] ); if ( !aGeomGroup->_is_nil() ) { int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),