summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_time_axis.cc
diff options
context:
space:
mode:
authorHans Fugal <hans@fugal.net>2006-07-29 03:17:11 +0000
committerHans Fugal <hans@fugal.net>2006-07-29 03:17:11 +0000
commit1f1c4981de73b13d0b7617d8ebe89d9f22dddec3 (patch)
tree90ab3942960de1af673d8d2b4423f0b09dd839b4 /gtk2_ardour/automation_time_axis.cc
parent277b771a978b10580a46e19f19ae0cf2d8819f46 (diff)
Compiles, but doesn't link. The link errors are mostly expected and are
tomorrow's task. git-svn-id: svn://localhost/ardour2/branches/undo@719 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_time_axis.cc')
-rw-r--r--gtk2_ardour/automation_time_axis.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index 92c35cf185..080a440bc9 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -1,4 +1,5 @@
#include <ardour/route.h>
+#include <pbd/memento_command.h>
#include "ardour_ui.h"
#include "automation_time_axis.h"
@@ -500,14 +501,13 @@ AutomationTimeAxisView::cut_copy_clear_one (AutomationLine& line, Selection& sel
AutomationList& alist (line.the_list());
bool ret = false;
- XMLNode &before, &after;
- before = alist.get_state();
+ XMLNode &before = alist.get_state();
switch (op) {
case Cut:
if ((what_we_got = alist.cut (selection.time.front().start, selection.time.front().end)) != 0) {
editor.get_cut_buffer().add (what_we_got);
- _session.add_command(MementoCommand<AutomationList>(alist, before, alist.get_state()));
+ _session.add_command(new MementoCommand<AutomationList>(alist, before, alist.get_state()));
ret = true;
}
break;
@@ -519,7 +519,7 @@ AutomationTimeAxisView::cut_copy_clear_one (AutomationLine& line, Selection& sel
case Clear:
if ((what_we_got = alist.cut (selection.time.front().start, selection.time.front().end)) != 0) {
- _session.add_command(MementoCommand<AutomationList>(alist, before, alist.get_state()));
+ _session.add_command(new MementoCommand<AutomationList>(alist, before, alist.get_state()));
delete what_we_got;
what_we_got = 0;
ret = true;
@@ -551,7 +551,7 @@ AutomationTimeAxisView::reset_objects_one (AutomationLine& line, PointSelection&
{
AutomationList& alist (line.the_list());
- _session.add_command (MementoUndoCommand<AutomationList>(alist, alist.get_state()));
+ _session.add_command (new MementoUndoCommand<AutomationList>(alist, alist.get_state()));
for (PointSelection::iterator i = selection.begin(); i != selection.end(); ++i) {
@@ -581,9 +581,8 @@ AutomationTimeAxisView::cut_copy_clear_objects_one (AutomationLine& line, PointS
AutomationList* what_we_got = 0;
AutomationList& alist (line.the_list());
bool ret = false;
- XMLNode &before, &after;
- before = alist.get_state();
+ XMLNode &before = alist.get_state();
for (PointSelection::iterator i = selection.begin(); i != selection.end(); ++i) {
@@ -595,7 +594,7 @@ AutomationTimeAxisView::cut_copy_clear_objects_one (AutomationLine& line, PointS
case Cut:
if ((what_we_got = alist.cut ((*i).start, (*i).end)) != 0) {
editor.get_cut_buffer().add (what_we_got);
- _session.add_command (MementoCommand<AutomationList>(alist, before, alist.get_state()));
+ _session.add_command (new MementoCommand<AutomationList>(alist, before, alist.get_state()));
ret = true;
}
break;
@@ -607,7 +606,7 @@ AutomationTimeAxisView::cut_copy_clear_objects_one (AutomationLine& line, PointS
case Clear:
if ((what_we_got = alist.cut ((*i).start, (*i).end)) != 0) {
- _session.add_command (MementoCommand<AutomationList>(alist, before, alist.get_state()));
+ _session.add_command (new MementoCommand<AutomationList>(alist, before, alist.get_state()));
delete what_we_got;
what_we_got = 0;
ret = true;
@@ -666,7 +665,7 @@ AutomationTimeAxisView::paste_one (AutomationLine& line, jack_nframes_t pos, flo
XMLNode &before = alist.get_state();
alist.paste (copy, pos, times);
- _session.add_command (MementoCommand<AutomationList>(alist, before, alist.get_state()));
+ _session.add_command (new MementoCommand<AutomationList>(alist, before, alist.get_state()));
return true;
}