summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_markers.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-10-23 22:28:27 +0000
committerCarl Hetherington <carl@carlh.net>2009-10-23 22:28:27 +0000
commit1f2a518ee20a9e011f75fa2d961fd14f018445c0 (patch)
tree2c7eb00fd61312d1159928347c9b69abe723a681 /gtk2_ardour/editor_markers.cc
parentd2a11c8c02614c9cd9248fa17945923535110c98 (diff)
Clean up and simplify code to find marks before and after a position, and hence improve snap to markers so that both start and end positions of a range marker are taken into account.
git-svn-id: svn://localhost/ardour2/branches/3.0@5897 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_markers.cc')
-rw-r--r--gtk2_ardour/editor_markers.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index b95c29ee42..7bd09379d8 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -827,7 +827,9 @@ Editor::marker_menu_range_to_next ()
return;
}
- nframes_t end = session->locations()->first_mark_after (marker->position());
+ nframes64_t start;
+ nframes64_t end;
+ session->locations()->marks_either_side (marker->position(), start, end);
if (end != max_frames) {
string range_name = l->name();