13
0

Update default time-domain logic

MinSec, CD-Frame, and Timecode grid should use AudoTime
This commit is contained in:
Robin Gareus 2022-04-27 14:59:15 +02:00
parent 7cd16d9473
commit 8d4516228a
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -6707,9 +6707,22 @@ Editor::duration_to_pixels_unrounded (timecnt_t const & dur) const
Temporal::TimeDomain
Editor::default_time_domain () const
{
if (_grid_type == GridTypeNone || _snap_mode == SnapOff) {
if (_snap_mode == SnapOff) {
return AudioTime;
}
switch (_grid_type) {
case GridTypeNone:
/* fallthrough */
case GridTypeMinSec:
/* fallthrough */
case GridTypeCDFrame:
/* fallthrough */
case GridTypeTimecode:
/* fallthrough */
return AudioTime;
default:
break;
}
return BeatTime;
}