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(new MementoCommand<AutomationList>(alist, before, alist.get_state()));
+ _session.add_command(new MementoCommand<AutomationList>(alist, &before, &alist.get_state()));
ret = true;
}
break;
case Clear:
if ((what_we_got = alist.cut (selection.time.front().start, selection.time.front().end)) != 0) {
- _session.add_command(new 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;
{
AutomationList& alist (line.the_list());
- _session.add_command (new MementoUndoCommand<AutomationList>(alist, alist.get_state()));
+ _session.add_command (new MementoCommand<AutomationList>(alist, &alist.get_state(), 0));
for (PointSelection::iterator i = selection.begin(); i != selection.end(); ++i) {
case Cut:
if ((what_we_got = alist.cut ((*i).start, (*i).end)) != 0) {
editor.get_cut_buffer().add (what_we_got);
- _session.add_command (new MementoCommand<AutomationList>(alist, before, alist.get_state()));
+ _session.add_command (new MementoCommand<AutomationList>(alist, &before, &alist.get_state()));
ret = true;
}
break;
case Clear:
if ((what_we_got = alist.cut ((*i).start, (*i).end)) != 0) {
- _session.add_command (new 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;
XMLNode &before = alist.get_state();
alist.paste (copy, pos, times);
- _session.add_command (new MementoCommand<AutomationList>(alist, before, alist.get_state()));
+ _session.add_command (new MementoCommand<AutomationList>(alist, &before, &alist.get_state()));
return true;
}