#include <LDOMParser.hxx>
-#ifdef WNT
+#ifdef WIN32
#include <windows.h>
#else
#include <unistd.h>
_AString comment;
_pyID obj = cmd->GetObject();
+ if ( obj.Search( "print " ) == 1 )
+ return; // print statement
+
if ( !obj.IsEmpty() && obj.Value( obj.Length() ) == ')' )
// remove an accessor method
obj = _pyCommand( obj ).GetObject();
{
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
- 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 );
}
theCommand->SetMethod( "GetFilterFromCriteria" );
// Swap "aFilterManager.CreateFilter()" and "smesh.GetFilterFromCriteria(criteria)"
- // GetCreationCmd()->Clear();
- // GetCreationCmd()->GetString() = theCommand->GetString();
- // theCommand->Clear();
- // theCommand->AddDependantCmd( GetCreationCmd() );
- // why swap?
GetCreationCmd()->Clear();
+ GetCreationCmd()->GetString() = theCommand->GetString();
+ theCommand->Clear();
+ theCommand->AddDependantCmd( GetCreationCmd() );
+ // why swap? -- it's needed
+ //GetCreationCmd()->Clear();
}
else if ( theCommand->GetMethod() == "SetMesh" )
{