From: eap Date: Mon, 3 Sep 2012 08:00:12 +0000 (+0000) Subject: Salome Forum http://www.salome-platform.org/forum/forum_10/350978231 X-Git-Tag: V6_6_0a1~153 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9e81eb1e255e19c11826f7475a25661709b71179;p=modules%2Fsmesh.git Salome Forum http://www.salome-platform.org/forum/forum_10/350978231 Clear AddHypothesis(geom,hyp) command when RemoveHypothesis(geom,hyp) encounters iff both geom and hyp are same --- diff --git a/src/SMESH_I/SMESH_2smeshpy.cxx b/src/SMESH_I/SMESH_2smeshpy.cxx index 0b8532118..aad251007 100644 --- a/src/SMESH_I/SMESH_2smeshpy.cxx +++ b/src/SMESH_I/SMESH_2smeshpy.cxx @@ -1539,7 +1539,8 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand ) // ---------------------------------------------------------------------- else if ( method == "RemoveHypothesis" ) // (geom, hyp) { - _pyID hypID = theCommand->GetArg( 2 ); + _pyID hypID = theCommand->GetArg( 2 ); + _pyID geomID = theCommand->GetArg( 1 ); // check if this mesh still has corresponding addition command bool hasAddCmd = false; @@ -1547,7 +1548,8 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand ) while ( cmd != myAddHypCmds.end() ) { // AddHypothesis(geom, hyp) - if ( hypID == (*cmd)->GetArg( 2 )) { // erase both (add and remove) commands + if ( hypID == (*cmd)->GetArg( 2 ) && + geomID == (*cmd)->GetArg( 1 )) { // erase both (add and remove) commands theCommand->Clear(); (*cmd)->Clear(); cmd = myAddHypCmds.erase( cmd );