From b9876aa1d08f83b9a9ef829e6a4dad94cf344e30 Mon Sep 17 00:00:00 2001 From: Sampo Savolainen Date: Sun, 6 Dec 2009 21:00:43 +0000 Subject: [PATCH] Eliminate double reversible commit from time stretch, and make the stretch operation lengthen / shorten the region as per operation. git-svn-id: svn://localhost/ardour2/branches/3.0@6318 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_drag.cc | 4 ++-- libs/ardour/rb_effect.cc | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 4c68a3f495..3794273694 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -2837,8 +2837,8 @@ TimeFXDrag::finished (GdkEvent* /*event*/, bool movement_occurred) RegionSelection rs; rs.add (_primary); - if (_editor->time_stretch (rs, percentage) == 0) { - _editor->session->commit_reversible_command (); + if (!_editor->time_stretch (rs, percentage) == 0) { + error << _("An error occurred while executing time stretch operation") << endmsg; } } diff --git a/libs/ardour/rb_effect.cc b/libs/ardour/rb_effect.cc index 99c60d224e..4cb77d1c58 100644 --- a/libs/ardour/rb_effect.cc +++ b/libs/ardour/rb_effect.cc @@ -354,6 +354,7 @@ RBEffect::run (boost::shared_ptr r) stretch, shift); (*x)->set_master_sources (region->master_sources()); + (*x)->set_length( (*x)->length() * stretch, this); } out: