summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_drag.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-01-27 16:29:01 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-01-27 16:29:01 +0000
commit33c61757fc8352fdb1280bca28b54d1adee183ff (patch)
tree3079597365e70769acd6befe3fa95dc8e9f87439 /gtk2_ardour/editor_drag.cc
parentfc3be1d42c6400896a85edbc83bda38242cec30a (diff)
promote Playlist::RegionList to ARDOUR::RegionList; fix timefx on multiple regions, even regions of mixed type. this mostly involved some trivial code changes but to make the code simpler and less error prone, the API switched away from using RegionSelection (list of regionviews that catches regionviews vanishing) and used RegionList (lists of regions, no semantics) instead.
git-svn-id: svn://localhost/ardour2/branches/3.0@11362 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r--gtk2_ardour/editor_drag.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index 269539dd72..582ddeb1fc 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -3304,15 +3304,16 @@ TimeFXDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
}
#endif
- // XXX how do timeFX on multiple regions ?
-
- RegionSelection rs;
- rs.add (_primary);
-
- RegionSelection all = _editor->get_equivalent_regions (rs, ARDOUR::Properties::edit.property_id);
+ if (!_editor->get_selection().regions.empty()) {
+ /* primary will already be included in the selection, and edit
+ group shared editing will propagate selection across
+ equivalent regions, so just use the current region
+ selection.
+ */
- if (_editor->time_stretch (all, percentage) == -1) {
- error << _("An error occurred while executing time stretch operation") << endmsg;
+ if (_editor->time_stretch (_editor->get_selection().regions, percentage) == -1) {
+ error << _("An error occurred while executing time stretch operation") << endmsg;
+ }
}
}