summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSampo Savolainen <v2@iki.fi>2009-12-06 21:00:43 +0000
committerSampo Savolainen <v2@iki.fi>2009-12-06 21:00:43 +0000
commitb9876aa1d08f83b9a9ef829e6a4dad94cf344e30 (patch)
treec7f3b6c5dcf01c46aac29bb3ae76684075c6eed3
parent52b4b464f9657860e07b224564245ce22ea03df8 (diff)
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
-rw-r--r--gtk2_ardour/editor_drag.cc4
-rw-r--r--libs/ardour/rb_effect.cc1
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<Region> r)
stretch,
shift);
(*x)->set_master_sources (region->master_sources());
+ (*x)->set_length( (*x)->length() * stretch, this);
}
out: