Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0021339: EDF 1928 SMESH: Create group of 0D elements
[modules/smesh.git]
/
src
/
SMESHGUI
/
SMESHGUI_NodesDlg.cxx
diff --git
a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx
b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx
index 460e532d3be36cb89d3f64396c529ea4d5e9c542..d82ec9c1d8aaaae1d3627a0783f13faa9543ba81 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_NodesDlg.cxx
+++ b/
src/SMESHGUI/SMESHGUI_NodesDlg.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
1
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
2
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
//
// 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();
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() );
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() ) ) {
_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 );
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 );
GroupGroupsLayout->addWidget( TextLabel_GroupName );
GroupGroupsLayout->addWidget( ComboBox_GroupName, 1 );
@@
-451,12
+452,12
@@
bool SMESHGUI_NodesDlg::ClickOnApply()
int idx = 0;
if( addToGroup ) {
aGroupName = ComboBox_GroupName->currentText();
int idx = 0;
if( addToGroup ) {
aGroupName = ComboBox_GroupName->currentText();
- for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
+ for ( int i = 1; i <
=
ComboBox_GroupName->count(); i++ ) {
QString aName = ComboBox_GroupName->itemText( i );
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
idx = i;
}
QString aName = ComboBox_GroupName->itemText( i );
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" ),
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" ),