$Id$
*/
-#include <iostream>
#include <string>
#include <sstream>
#include <time.h>
: Command(rhs._name)
, _clearing(false)
{
+ _timestamp = rhs._timestamp;
clear ();
actions.insert(actions.end(),rhs.actions.begin(),rhs.actions.end());
}
UndoTransaction::~UndoTransaction ()
{
- cerr << "UndoTransaction destroyed\n";
drop_references ();
clear ();
}
void
command_death (UndoTransaction* ut, Command* c)
{
- cerr << "Command drop ref\n";
-
if (ut->clearing()) {
return;
}
UndoHistory::clear_redo ()
{
_clearing = true;
+ for (std::list<UndoTransaction*>::iterator i = RedoList.begin(); i != RedoList.end(); ++i) {
+ delete *i;
+ }
RedoList.clear ();
_clearing = false;
UndoHistory::clear_undo ()
{
_clearing = true;
+ for (std::list<UndoTransaction*>::iterator i = UndoList.begin(); i != UndoList.end(); ++i) {
+ delete *i;
+ }
UndoList.clear ();
_clearing = false;