mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-13 01:34:34 +05:00
Fix SIGSEGV in "Mesh Element Info" dialog box if invalid node/element id is printed
This commit is contained in:
parent
4830d553eb
commit
ee492b84c1
@ -1454,9 +1454,15 @@ void SMESHGUI_MeshInfoDlg::idChanged()
|
|||||||
TColStd_MapOfInteger ID;
|
TColStd_MapOfInteger ID;
|
||||||
QSet<long> ids;
|
QSet<long> ids;
|
||||||
QStringList idTxt = myID->text().split( " ", QString::SkipEmptyParts );
|
QStringList idTxt = myID->text().split( " ", QString::SkipEmptyParts );
|
||||||
foreach ( QString id, idTxt ) {
|
foreach ( QString tid, idTxt ) {
|
||||||
ID.Add( id.trimmed().toLong() );
|
long id = tid.trimmed().toLong();
|
||||||
ids << id.trimmed().toLong();
|
const SMDS_MeshElement* e = myMode->checkedId() == ElemMode ?
|
||||||
|
myActor->GetObject()->GetMesh()->FindElement( id ) :
|
||||||
|
myActor->GetObject()->GetMesh()->FindNode( id );
|
||||||
|
if ( e ) {
|
||||||
|
ID.Add( id );
|
||||||
|
ids << id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
selector->AddOrRemoveIndex( IO, ID, false );
|
selector->AddOrRemoveIndex( IO, ID, false );
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow() )
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow() )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user