13
0

allow new locations creation from playhead to use default time domain

This commit is contained in:
Paul Davis 2021-01-19 14:14:07 -07:00
parent 874a009d76
commit 87dfef28f6

View File

@ -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);
}
}
}