mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-12 20:17:27 +05:00
Fix for bug IPAL9582 ( 3.0.0: Crash after trying create elements of a mesh on non-existing nodes ).
This commit is contained in:
parent
8c7ffa49a6
commit
ce575dc0b9
@ -524,23 +524,30 @@ void SMESHGUI_AddMeshElementDlg::onTextChange (const QString& theNewText)
|
|||||||
TColStd_MapOfInteger newIndices;
|
TColStd_MapOfInteger newIndices;
|
||||||
|
|
||||||
QStringList aListId = QStringList::split(" ", theNewText, false);
|
QStringList aListId = QStringList::split(" ", theNewText, false);
|
||||||
|
bool allOk = true;
|
||||||
for (int i = 0; i < aListId.count(); i++) {
|
for (int i = 0; i < aListId.count(); i++) {
|
||||||
if( const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() ) )
|
if( const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() ) )
|
||||||
{
|
{
|
||||||
newIndices.Add( n->GetID() );
|
newIndices.Add( n->GetID() );
|
||||||
myNbOkNodes++;
|
myNbOkNodes++;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
allOk = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
|
mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->highlight( myActor->getIO(), true, true );
|
aViewWindow->highlight( myActor->getIO(), true, true );
|
||||||
|
|
||||||
bool aNodesOK = false;
|
myNbOkNodes = ( allOk && myNbNodes == aListId.count() );
|
||||||
if (myIsPoly && myElementType == SMDSAbs_Face && aListId.count() >=3 ){
|
|
||||||
myNbOkNodes = aListId.count();
|
if (myIsPoly)
|
||||||
aNodesOK = true;
|
{
|
||||||
}
|
if ( !allOk || myElementType != SMDSAbs_Face || aListId.count() < 3 )
|
||||||
|
myNbOkNodes = 0;
|
||||||
|
else
|
||||||
|
myNbOkNodes = aListId.count();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(myNbOkNodes) {
|
if(myNbOkNodes) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user