X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_NodesDlg.cxx;h=3f369e79009ffb1b976f3f77e71ff8c940b4d113;hp=460e532d3be36cb89d3f64396c529ea4d5e9c542;hb=d4a710ce52f6e76786a7b3845e2f7975dc9a00b1;hpb=2c607013a23bd4e7ba07e72e0c04dee2c1209cff diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index 460e532d3..3f369e790 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 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 @@ -100,8 +100,8 @@ namespace SMESH try { _PTR(SObject) aSobj = SMESH::FindSObject( theMesh ); SMESH::SMESH_MeshEditor_var aMeshEditor = theMesh->GetMeshEditor(); - aNodeId = aMeshEditor->AddNode( x, y, z ); theMesh->SetParameters( theParameters.join(":").toLatin1().constData() ); + aNodeId = aMeshEditor->AddNode( x, y, z ); _PTR(Study) aStudy = GetActiveStudyDocument(); CORBA::Long anId = aStudy->StudyId(); if (TVisualObjPtr aVisualObj = SMESH::GetVisualObj( anId, aSobj->GetID().c_str() ) ) { @@ -297,6 +297,7 @@ SMESHGUI_NodesDlg::SMESHGUI_NodesDlg( 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 ); @@ -456,7 +457,7 @@ bool SMESHGUI_NodesDlg::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" ),