Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8c7ffa4
)
Fix for bug IPAL9582 ( 3.0.0: Crash after trying create elements of a mesh on non...
author
mzn
<mzn@opencascade.com>
Thu, 28 Jul 2005 14:48:19 +0000
(14:48 +0000)
committer
mzn
<mzn@opencascade.com>
Thu, 28 Jul 2005 14:48:19 +0000
(14:48 +0000)
src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx
patch
|
blob
|
history
diff --git
a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx
b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx
index 823716a853bb6cd4f69b87c496538c69aba2e665..0915c3923d88e008353f8250a4722a727af8634b 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx
+++ b/
src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx
@@
-524,23
+524,30
@@
void SMESHGUI_AddMeshElementDlg::onTextChange (const QString& theNewText)
TColStd_MapOfInteger newIndices;
QStringList aListId = QStringList::split(" ", theNewText, false);
TColStd_MapOfInteger newIndices;
QStringList aListId = QStringList::split(" ", theNewText, false);
+ bool allOk = true;
for (int i = 0; i < aListId.count(); i++) {
if( const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() ) )
{
newIndices.Add( n->GetID() );
myNbOkNodes++;
}
for (int i = 0; i < aListId.count(); i++) {
if( const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() ) )
{
newIndices.Add( n->GetID() );
myNbOkNodes++;
}
+ else
+ allOk = false;
}
mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->highlight( myActor->getIO(), true, true );
}
mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->highlight( myActor->getIO(), true, true );
- bool aNodesOK = false;
- if (myIsPoly && myElementType == SMDSAbs_Face && aListId.count() >=3 ){
- myNbOkNodes = aListId.count();
- aNodesOK = true;
- }
+ myNbOkNodes = ( allOk && myNbNodes == aListId.count() );
+
+ if (myIsPoly)
+ {
+ if ( !allOk || myElementType != SMDSAbs_Face || aListId.count() < 3 )
+ myNbOkNodes = 0;
+ else
+ myNbOkNodes = aListId.count();
+ }
}
if(myNbOkNodes) {
}
if(myNbOkNodes) {