diff options
author | Colin Fletcher <colin.m.fletcher@googlemail.com> | 2015-06-14 18:07:27 +0100 |
---|---|---|
committer | Colin Fletcher <colin.m.fletcher@googlemail.com> | 2015-06-17 17:15:21 +0100 |
commit | 34e1e00f8bd42ac531537de8c7a7a6dc9b23228c (patch) | |
tree | 507901b266d35f06b4d49abba1bdbcedb9f302d2 | |
parent | d059bdb40c65f53c1a4952f88a7a0ef5d99c99fb (diff) |
Insert time: fix moving of range markers
When inserting time and moving a range marker, move its end first, before
moving its start, so that if the time being inserted is greater than the
length of the range, we don't try to set its start to after its end.
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 5c45951e04..c46b49505c 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -7038,10 +7038,11 @@ Editor::insert_time ( if ((*i)->position_lock_style() == AudioTime || glued_markers_too) { if ((*i)->start() >= pos) { - (*i)->set_start ((*i)->start() + frames); + // move end first, in case we're moving by more than the length of the range if (!(*i)->is_mark()) { (*i)->set_end ((*i)->end() + frames); } + (*i)->set_start ((*i)->start() + frames); moved = true; } |