mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-19 03:50:33 +05:00
0021799: EDF 2344 SMESH: Existing groups are not taken into account when adding new elements into groups
This commit is contained in:
parent
779adc8fa5
commit
7c8ba54a1a
@ -498,12 +498,12 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
|
|||||||
int idx = 0;
|
int idx = 0;
|
||||||
if( addToGroup ) {
|
if( addToGroup ) {
|
||||||
aGroupName = ComboBox_GroupName->currentText();
|
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 );
|
QString aName = ComboBox_GroupName->itemText( i );
|
||||||
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
||||||
idx = i;
|
idx = i;
|
||||||
}
|
}
|
||||||
if ( idx > 0 && idx < myGroups.count() ) {
|
if ( idx > 0 && idx <= myGroups.count() ) {
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
||||||
if ( !aGeomGroup->_is_nil() ) {
|
if ( !aGeomGroup->_is_nil() ) {
|
||||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||||
|
@ -711,12 +711,12 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
|
|||||||
int idx = 0;
|
int idx = 0;
|
||||||
if( addToGroup ) {
|
if( addToGroup ) {
|
||||||
aGroupName = ComboBox_GroupName->currentText();
|
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 );
|
QString aName = ComboBox_GroupName->itemText( i );
|
||||||
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
||||||
idx = i;
|
idx = i;
|
||||||
}
|
}
|
||||||
if ( idx > 0 && idx < myGroups.count() ) {
|
if ( idx > 0 && idx <= myGroups.count() ) {
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
||||||
if ( !aGeomGroup->_is_nil() ) {
|
if ( !aGeomGroup->_is_nil() ) {
|
||||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||||
|
@ -458,12 +458,12 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
|
|||||||
int idx = 0;
|
int idx = 0;
|
||||||
if( addToGroup ) {
|
if( addToGroup ) {
|
||||||
aGroupName = ComboBox_GroupName->currentText();
|
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 );
|
QString aName = ComboBox_GroupName->itemText( i );
|
||||||
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
||||||
idx = i;
|
idx = i;
|
||||||
}
|
}
|
||||||
if ( idx > 0 && idx < myGroups.count() ) {
|
if ( idx > 0 && idx <= myGroups.count() ) {
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
||||||
if ( !aGeomGroup->_is_nil() ) {
|
if ( !aGeomGroup->_is_nil() ) {
|
||||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||||
|
@ -452,12 +452,12 @@ bool SMESHGUI_NodesDlg::ClickOnApply()
|
|||||||
int idx = 0;
|
int idx = 0;
|
||||||
if( addToGroup ) {
|
if( addToGroup ) {
|
||||||
aGroupName = ComboBox_GroupName->currentText();
|
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 );
|
QString aName = ComboBox_GroupName->itemText( i );
|
||||||
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
||||||
idx = i;
|
idx = i;
|
||||||
}
|
}
|
||||||
if ( idx > 0 && idx < myGroups.count() ) {
|
if ( idx > 0 && idx <= myGroups.count() ) {
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
||||||
if ( !aGeomGroup->_is_nil() ) {
|
if ( !aGeomGroup->_is_nil() ) {
|
||||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||||
|
Loading…
Reference in New Issue
Block a user