diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 84ab9e62e7..21eae1975e 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -1387,7 +1387,7 @@ public: bool bang_trigger_at(int32_t route_index, int32_t row_index); bool unbang_trigger_at(int32_t route_index, int32_t row_index); - void globally_change_time_domain (Temporal::TimeDomain from, Temporal::TimeDomain to); + PBD::Command* globally_change_time_domain (Temporal::TimeDomain from, Temporal::TimeDomain to); protected: friend class AudioEngine; diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc index b98d1d9d08..d81890a979 100644 --- a/libs/ardour/session_time.cc +++ b/libs/ardour/session_time.cc @@ -299,9 +299,11 @@ Session::any_duration_to_samples (samplepos_t position, AnyTime const & duration return duration.samples; } -void +PBD::Command* Session::globally_change_time_domain (Temporal::TimeDomain from, Temporal::TimeDomain to) { + PBD::Command* undo_command = new Temporal::TimeDomainCommand (from, to); + { std::shared_ptr rl (routes.reader()); @@ -312,4 +314,6 @@ Session::globally_change_time_domain (Temporal::TimeDomain from, Temporal::TimeD _playlists->globally_change_time_domain (from, to); _locations->globally_change_time_domain (from, to); + + return undo_command; }