diff options
author | Carl Hetherington <carl@carlh.net> | 2010-04-27 23:34:22 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-04-27 23:34:22 +0000 |
commit | f0db054a07ecc9d49fede8fcc9175a85c635369f (patch) | |
tree | 539c1cedceb7c4f2e731de5fe3073284d1939253 /gtk2_ardour | |
parent | a54d090992e193fbde1ce4e28336c144b7bc3d61 (diff) |
Don't report an error when the user cancels a time stretch operation.
git-svn-id: svn://localhost/ardour2/branches/3.0@7008 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_drag.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/editor_timefx.cc | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index d9da60e0c8..a4f402ba2c 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -3100,7 +3100,7 @@ TimeFXDrag::finished (GdkEvent* /*event*/, bool movement_occurred) RegionSelection rs; rs.add (_primary); - if (!_editor->time_stretch (rs, percentage) == 0) { + if (_editor->time_stretch (rs, percentage) == -1) { error << _("An error occurred while executing time stretch operation") << endmsg; } } diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc index 6a1f0d021a..6f5e380fef 100644 --- a/gtk2_ardour/editor_timefx.cc +++ b/gtk2_ardour/editor_timefx.cc @@ -58,6 +58,7 @@ using namespace PBD; using namespace Gtk; using namespace Gtkmm2ext; +/** @return -1 in case of error, 1 if operation was cancelled by the user, 0 if everything went ok */ int Editor::time_stretch (RegionSelection& regions, float fraction) { @@ -96,6 +97,7 @@ Editor::pitch_shift (RegionSelection& regions, float fraction) return time_fx (regions, fraction, true); } +/** @return -1 in case of error, 1 if operation was cancelled by the user, 0 if everything went ok */ int Editor::time_fx (RegionSelection& regions, float val, bool pitching) { |