From 87dfef28f693335f6eabc99f6f1a11ce9dd2e18c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 19 Jan 2021 14:14:07 -0700 Subject: [PATCH] allow new locations creation from playhead to use default time domain --- gtk2_ardour/editor_markers.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc index 0533141b19..1b11539340 100644 --- a/gtk2_ardour/editor_markers.cc +++ b/gtk2_ardour/editor_markers.cc @@ -1322,16 +1322,20 @@ Editor::marker_menu_set_from_playhead () if ((l = find_location_from_marker (marker, is_start)) != 0) { -#warning NUTEMPO what if the user wants musical time here? + timepos_t pos (_session->audible_sample()); + + if (default_time_domain() == Temporal::BeatTime) { + pos = timepos_t (pos.beats()); + } if (l->is_mark()) { - l->set_start (timepos_t (_session->audible_sample ()), false); + l->set_start (pos, false); } else { if (is_start) { - l->set_start (timepos_t (_session->audible_sample ()), false); + l->set_start (pos, false); } else { - l->set_end (timepos_t (_session->audible_sample ()), false); + l->set_end (pos, false); } } }