+ // in snapshot mode, clear the previous CheckCompute()
+ else if ( method == "CheckCompute" )
+ {
+ if ( !theGen->IsToKeepAllCommands() ) // !historical
+ {
+ if ( !myLastCheckCmd.IsNull() )
+ {
+ // check if the previously computed mesh has been edited,
+ // if so then we do not clear the previous Compute()
+ bool toClear = true;
+ list< Handle(_pyMeshEditor)>::iterator e = myEditors.begin();
+ for ( ; e != myEditors.end() && toClear; ++e )
+ {
+ list< Handle(_pyCommand)>& cmds = (*e)->GetProcessedCmds();
+ list< Handle(_pyCommand) >::reverse_iterator cmd = cmds.rbegin();
+ if ( cmd != cmds.rend() &&
+ (*cmd)->GetOrderNb() > myLastCheckCmd->GetOrderNb() )
+ toClear = false;
+ }
+ if ( toClear )
+ myLastCheckCmd->Clear();
+ }
+ myLastCheckCmd = theCommand;
+ }
+ }