Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Regression of SALOME_TESTS/Grids/smesh/imps_08/I8
[modules/smesh.git]
/
src
/
SMESH_I
/
SMESH_2smeshpy.cxx
diff --git
a/src/SMESH_I/SMESH_2smeshpy.cxx
b/src/SMESH_I/SMESH_2smeshpy.cxx
index 6b3da9a340f8a08fd7e8ac91c37608c0294fd79a..929da0dcf43bc2518b5e946ff3dd1d90e88374f8 100644
(file)
--- a/
src/SMESH_I/SMESH_2smeshpy.cxx
+++ b/
src/SMESH_I/SMESH_2smeshpy.cxx
@@
-4249,10
+4249,13
@@
bool _pySelfEraser::CanClear()
{
int nbCalls = 0;
std::list< Handle(_pyCommand) >& cmds = GetProcessedCmds();
{
int nbCalls = 0;
std::list< Handle(_pyCommand) >& cmds = GetProcessedCmds();
- std::list< Handle(_pyCommand) >::
const_
iterator cmd = cmds.begin();
- for ( ; cmd != cmds.end();
++cmd
)
+ std::list< Handle(_pyCommand) >::iterator cmd = cmds.begin();
+ for ( ; cmd != cmds.end(); )
// check of cmd emptiness is not enough as object can change
// check of cmd emptiness is not enough as object can change
- nbCalls += ( ( *cmd )->GetString().Search( GetID() ) > 0 );
+ if (( *cmd )->GetString().Search( GetID() ) > 0 )
+ ++nbCalls, ++cmd;
+ else
+ cmd = cmds.erase( cmd ); // save the cmd from clearing
toErase = ( nbCalls < 1 );
}
toErase = ( nbCalls < 1 );
}