Add an argument to move markers during tempo-map

This commit is contained in:
Ben Loftis 2023-09-13 09:01:31 -05:00 committed by Robin Gareus
parent b03f6d8616
commit 8ba74e2a51
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 17 additions and 1 deletions

View File

@ -796,6 +796,11 @@ Location::set_scene_change (std::shared_ptr<SceneChange> sc)
void
Location::start_domain_bounce (Temporal::DomainBounceInfo& cmd)
{
if (cmd.move_markers && cmd.to == AudioTime) {
/* user wants the markers to move during a tempo-map; skip this domain bounce */
return;
}
if (_start.time_domain() == cmd.to) {
/* has the right domain to begin with */
return;
@ -814,6 +819,11 @@ Location::start_domain_bounce (Temporal::DomainBounceInfo& cmd)
void
Location::finish_domain_bounce (Temporal::DomainBounceInfo& cmd)
{
if ( cmd.move_markers && cmd.to == AudioTime ) {
/* user wants the markers to move during a tempo-map; skip this domain bounce */
return;
}
if (_start.time_domain() == cmd.to) {
/* had the right domain to begin with */
return;

View File

@ -53,13 +53,19 @@ struct LIBTEMPORAL_API TimeDomainSwapper : public virtual PBD::Destructible {
struct LIBTEMPORAL_API DomainBounceInfo
{
DomainBounceInfo (TimeDomain f, TimeDomain t) : from (f), to (t) {}
DomainBounceInfo (TimeDomain f, TimeDomain t, bool m = false)
: from (f)
, to (t)
, move_markers (m)
{}
const TimeDomain from;
const TimeDomain to;
TimeDomainPosChanges positions;
TimeDomainCntChanges counts;
bool move_markers;
};
}