summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_selection.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-11-09 13:28:45 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-11-09 13:28:45 +0000
commit79ba9960964c8ea701abfe00dbef128ca7da9fbd (patch)
tree3f303f7a8e7c0ab265d392fe8d2bb3b6f1339b9d /gtk2_ardour/editor_selection.cc
parent96fa1cd0b636d47d4b0787281fc9401693a77af9 (diff)
catch markers as they go away, to avoid selection corruption; add select-range-between-cursors (F3); add unimplemented select-all-within-cursors (different from select-all-between-cursors); make ctrl-x/delete delete a marker if the mouse is pointing at it
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2611 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_selection.cc')
-rw-r--r--gtk2_ardour/editor_selection.cc32
1 files changed, 28 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc
index 9ccd47d87d..91d3a3b939 100644
--- a/gtk2_ardour/editor_selection.cc
+++ b/gtk2_ardour/editor_selection.cc
@@ -1034,7 +1034,7 @@ Editor::select_all_selectables_using_edit (bool after)
}
void
-Editor::select_all_selectables_between ()
+Editor::select_all_selectables_between (bool within)
{
nframes64_t start;
nframes64_t end;
@@ -1055,8 +1055,6 @@ Editor::select_all_selectables_between ()
swap (start, end);
}
- begin_reversible_command (_("select all between cursors"));
-
end -= 1;
for (TrackViewList::iterator iter = track_views.begin(); iter != track_views.end(); ++iter) {
@@ -1066,6 +1064,32 @@ Editor::select_all_selectables_between ()
(*iter)->get_selectables (start, end, 0, DBL_MAX, touched);
}
selection->set (touched);
- commit_reversible_command ();
}
+void
+Editor::select_range_between ()
+{
+ nframes64_t start;
+ nframes64_t end;
+ list<Selectable *> touched;
+
+ if (_edit_point == EditAtPlayhead) {
+ return;
+ }
+
+ start = get_preferred_edit_position();
+ end = playhead_cursor->current_frame;
+
+ if (start == end) {
+ return;
+ }
+
+ if (start > end) {
+ swap (start, end);
+ }
+
+ end -= 1;
+
+ set_mouse_mode (MouseRange);
+ selection->set (0, start, end);
+}