diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-12-13 19:39:36 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-12-13 19:39:36 +0000 |
commit | 40e9dae606c034ce078e929421f8ae122dda4efc (patch) | |
tree | 144c5f67391393fcee01d84c8070aa899873f4cd /gtk2_ardour/selection.cc | |
parent | 2292e33ee418070c4d12971a72e01eb29dfc8de9 (diff) |
various fixes for "advanced" operations on range selections. ctrl-drags now add a new range selection, allowing discontiguous selections as in ardour2, shift-click extends an existing range selection to the clicked position, alt-drag on a range selection moves it, and to do a so-called "separation drag" now use ctrl-alt-drag (or ctrl-alt-click)
git-svn-id: svn://localhost/ardour2/branches/3.0@13660 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/selection.cc')
-rw-r--r-- | gtk2_ardour/selection.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index 395ceda169..cf25826676 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -532,6 +532,21 @@ Selection::add (framepos_t start, framepos_t end) } void +Selection::move_time (framecnt_t distance) +{ + if (distance == 0) { + return; + } + + for (list<AudioRange>::iterator i = time.begin(); i != time.end(); ++i) { + (*i).start += distance; + (*i).end += distance; + } + + TimeChanged (); +} + +void Selection::replace (uint32_t sid, framepos_t start, framepos_t end) { clear_objects(); //enforce object/range exclusivity |