mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 10:10:33 +05:00
0021436: EDF 1810 SMESH: Create a segment and adding it to a group causes Salome to crash
This commit is contained in:
parent
86b8303fcf
commit
e5dee33572
@ -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" ),
|
||||
|
@ -359,8 +359,6 @@ static int LastPentahedronIds[] = {1,2,0,4,5,3,3,4,5};
|
||||
static int FirstHexahedronIds[] = {0,1,2,3,4,5,6,7,0,1,2,3};
|
||||
static int LastHexahedronIds[] = {1,2,3,0,5,6,7,4,4,5,6,7};
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
\class BusyLocker
|
||||
\brief Simple 'busy state' flag locker.
|
||||
@ -419,7 +417,8 @@ SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theM
|
||||
mySMESHGUI( theModule ),
|
||||
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
|
||||
myType( theType ),
|
||||
myBusy( false )
|
||||
myBusy( false ),
|
||||
myIsEditCorners( false )
|
||||
{
|
||||
setModal( false );
|
||||
setAttribute( Qt::WA_DeleteOnClose, true );
|
||||
@ -518,6 +517,7 @@ SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theM
|
||||
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 );
|
||||
@ -733,7 +733,7 @@ void SMESHGUI_AddQuadraticElementDlg::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" ),
|
||||
|
@ -259,6 +259,7 @@ SMESHGUI_CreatePolyhedralVolumeDlg::SMESHGUI_CreatePolyhedralVolumeDlg( SMESHGUI
|
||||
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 );
|
||||
@ -462,7 +463,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::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" ),
|
||||
|
@ -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" ),
|
||||
|
Loading…
Reference in New Issue
Block a user