diff options
author | David Robillard <d@drobilla.net> | 2008-10-03 18:24:38 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-10-03 18:24:38 +0000 |
commit | ad4919ce920a1a588c9ecd3d822dacfb93d74bb7 (patch) | |
tree | f9636723272d7b06635aa2f1323a4ba3a614fb2c /gtk2_ardour/editor_ops.cc | |
parent | 21c4721a68d42b05beb3a2e8d68d99a5cdd3ef41 (diff) |
Assortment of minor changes from 2.0-ongoing.
git-svn-id: svn://localhost/ardour2/branches/3.0@3852 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index df2752bd93..cac7be90bd 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -3310,9 +3310,9 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const return; } - nframes64_t distance; + nframes64_t distance = 0; nframes64_t pos = 0; - int dir = 0; + int dir = 1; list<RegionView*> sorted; rs.by_position (sorted); @@ -3324,7 +3324,6 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const pos = position; if (position > r->position()) { distance = position - r->position(); - dir = 1; } else { distance = r->position() - position; dir = -1; @@ -3335,7 +3334,6 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const if (position > r->last_frame()) { distance = position - r->last_frame(); pos = r->position() + distance; - dir = 1; } else { distance = r->last_frame() - position; pos = r->position() - distance; @@ -3347,7 +3345,6 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const pos = r->adjust_to_sync (position); if (pos > r->position()) { distance = pos - r->position(); - dir = 1; } else { distance = r->position() - pos; dir = -1; |