projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rework MIDI [processor|plugin] chain
[ardour.git]
/
libs
/
pbd
/
undo.cc
diff --git
a/libs/pbd/undo.cc
b/libs/pbd/undo.cc
index 71a5d1e2637aa71da846fe30b9d21486419f2278..42f7d574ea4030f44f486215901dedba64c0af25 100644
(file)
--- a/
libs/pbd/undo.cc
+++ b/
libs/pbd/undo.cc
@@
-18,7
+18,6
@@
$Id$
*/
$Id$
*/
-#include <iostream>
#include <string>
#include <sstream>
#include <time.h>
#include <string>
#include <sstream>
#include <time.h>
@@
-41,13
+40,13
@@
UndoTransaction::UndoTransaction (const UndoTransaction& rhs)
: Command(rhs._name)
, _clearing(false)
{
: Command(rhs._name)
, _clearing(false)
{
+ _timestamp = rhs._timestamp;
clear ();
actions.insert(actions.end(),rhs.actions.begin(),rhs.actions.end());
}
UndoTransaction::~UndoTransaction ()
{
clear ();
actions.insert(actions.end(),rhs.actions.begin(),rhs.actions.end());
}
UndoTransaction::~UndoTransaction ()
{
- cerr << "UndoTransaction destroyed\n";
drop_references ();
clear ();
}
drop_references ();
clear ();
}
@@
-55,8
+54,6
@@
UndoTransaction::~UndoTransaction ()
void
command_death (UndoTransaction* ut, Command* c)
{
void
command_death (UndoTransaction* ut, Command* c)
{
- cerr << "Command drop ref\n";
-
if (ut->clearing()) {
return;
}
if (ut->clearing()) {
return;
}
@@
-297,6
+294,9
@@
void
UndoHistory::clear_redo ()
{
_clearing = true;
UndoHistory::clear_redo ()
{
_clearing = true;
+ for (std::list<UndoTransaction*>::iterator i = RedoList.begin(); i != RedoList.end(); ++i) {
+ delete *i;
+ }
RedoList.clear ();
_clearing = false;
RedoList.clear ();
_clearing = false;
@@
-308,6
+308,9
@@
void
UndoHistory::clear_undo ()
{
_clearing = true;
UndoHistory::clear_undo ()
{
_clearing = true;
+ for (std::list<UndoTransaction*>::iterator i = UndoList.begin(); i != UndoList.end(); ++i) {
+ delete *i;
+ }
UndoList.clear ();
_clearing = false;
UndoList.clear ();
_clearing = false;