Eliminate double reversible commit from time stretch, and make the stretch operation...
authorSampo Savolainen <v2@iki.fi>
Sun, 6 Dec 2009 21:00:43 +0000 (21:00 +0000)
committerSampo Savolainen <v2@iki.fi>
Sun, 6 Dec 2009 21:00:43 +0000 (21:00 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@6318 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_drag.cc
libs/ardour/rb_effect.cc

index 4c68a3f495129357fcce353cb27837b3e688eda3..37942736945a63f60978d8a96b6c9ef5d2f0ddc2 100644 (file)
@@ -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;
        }
 }
 
index 99c60d224eab96a4ecd4baf0c6230e76cd61c059..4cb77d1c5822862e2ca95ea8d712075c02f8d5ba 100644 (file)
@@ -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: