summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_time_axis.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-06-12 15:50:47 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-06-12 15:50:47 +0000
commita82b900e4475abdf1815f660a4a091fa333da548 (patch)
tree543b3f05cd8df21282011f5506c1a33c793ec107 /gtk2_ardour/automation_time_axis.cc
parent1de3eac2deeb5400e349114ff59d6fa0a6d6de1e (diff)
implement a delete operation that works like "cut" but doesn't put the deleted items in the cut buffer. you will not be able to access this from your keyboard (Delete keyunless you remove your existing ~/.config/ardour3/ardour.bindings file3.0-alpha6
git-svn-id: svn://localhost/ardour2/branches/3.0@9711 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_time_axis.cc')
-rw-r--r--gtk2_ardour/automation_time_axis.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index d12dfa97bd..85ba4b378c 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -627,6 +627,12 @@ AutomationTimeAxisView::cut_copy_clear_one (AutomationLine& line, Selection& sel
double const end = tc.from (selection.time.front().end - tc.origin_b ());
switch (op) {
+ case Delete:
+ if (alist->cut (start, end) != 0) {
+ _session->add_command(new MementoCommand<AutomationList>(*alist.get(), &before, &alist->get_state()));
+ }
+ break;
+
case Cut:
if ((what_we_got = alist->cut (start, end)) != 0) {
@@ -720,6 +726,11 @@ AutomationTimeAxisView::cut_copy_clear_objects_one (AutomationLine& line, PointS
}
switch (op) {
+ case Delete:
+ if (alist->cut ((*i).start, (*i).end) != 0) {
+ _session->add_command (new MementoCommand<AutomationList>(*alist.get(), new XMLNode (before), &alist->get_state()));
+ }
+ break;
case Cut:
if ((what_we_got = alist->cut ((*i).start, (*i).end)) != 0) {
_editor.get_cut_buffer().add (what_we_got);