projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge from trunk
[ardour.git]
/
gtk2_ardour
/
route_time_axis.cc
diff --git
a/gtk2_ardour/route_time_axis.cc
b/gtk2_ardour/route_time_axis.cc
index 8dca7be480f2042e06f46e156169c0976cb24269..6e578a13e7cc75b6868d3875b197c247409a750a 100644
(file)
--- a/
gtk2_ardour/route_time_axis.cc
+++ b/
gtk2_ardour/route_time_axis.cc
@@
-29,6
+29,7
@@
#include <pbd/error.h>
#include <pbd/stl_delete.h>
#include <pbd/whitespace.h>
#include <pbd/error.h>
#include <pbd/stl_delete.h>
#include <pbd/whitespace.h>
+#include <pbd/memento_command.h>
#include <gtkmm/menu.h>
#include <gtkmm/menuitem.h>
#include <gtkmm/menu.h>
#include <gtkmm/menuitem.h>
@@
-60,8
+61,6
@@
#include "gui_thread.h"
#include "keyboard.h"
#include "playlist_selector.h"
#include "gui_thread.h"
#include "keyboard.h"
#include "playlist_selector.h"
-#include "plugin_selector.h"
-#include "plugin_ui.h"
#include "point_selection.h"
#include "prompter.h"
#include "public_editor.h"
#include "point_selection.h"
#include "prompter.h"
#include "public_editor.h"
@@
-1050,12
+1049,12
@@
RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
}
}
}
}
+ XMLNode &before = playlist->get_state();
switch (op) {
case Cut:
switch (op) {
case Cut:
- _session.add_undo (playlist->get_memento());
if ((what_we_got = playlist->cut (time)) != 0) {
editor.get_cut_buffer().add (what_we_got);
if ((what_we_got = playlist->cut (time)) != 0) {
editor.get_cut_buffer().add (what_we_got);
- _session.add_
redo_no_execute (playlist->get_memento(
));
+ _session.add_
command( new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()
));
ret = true;
}
break;
ret = true;
}
break;
@@
-1066,9
+1065,8
@@
RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
break;
case Clear:
break;
case Clear:
- _session.add_undo (playlist->get_memento());
if ((what_we_got = playlist->cut (time)) != 0) {
if ((what_we_got = playlist->cut (time)) != 0) {
- _session.add_
redo_no_execute (playlist->get_memento(
));
+ _session.add_
command( new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()
));
what_we_got->unref ();
ret = true;
}
what_we_got->unref ();
ret = true;
}
@@
-1097,9
+1095,9
@@
RouteTimeAxisView::paste (jack_nframes_t pos, float times, Selection& selection,
if (get_diskstream()->speed() != 1.0f)
pos = session_frame_to_track_frame(pos, get_diskstream()->speed() );
if (get_diskstream()->speed() != 1.0f)
pos = session_frame_to_track_frame(pos, get_diskstream()->speed() );
-
_session.add_undo (playlist->get_memento()
);
+
XMLNode &before = playlist->get_state(
);
playlist->paste (**p, pos, times);
playlist->paste (**p, pos, times);
- _session.add_
redo_no_execute (playlist->get_memento(
));
+ _session.add_
command( new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()
));
return true;
}
return true;
}