13
0

editor: add method to get time domain from any object with a ::time_domain() method

This commit is contained in:
Paul Davis 2022-05-27 15:56:41 -06:00
parent 39248d682d
commit 73a6cb7957

View File

@ -2474,6 +2474,16 @@ private:
void remove_gap_marker_callback (Temporal::timepos_t at, Temporal::timecnt_t distance);
template<typename T>
Temporal::TimeDomain drag_time_domain (T* thing_with_time_domain) {
return thing_with_time_domain ? thing_with_time_domain->time_domain() : Temporal::AudioTime;
}
template<typename T>
Temporal::TimeDomain drag_time_domain (boost::shared_ptr<T> thing_with_time_domain) {
return thing_with_time_domain ? thing_with_time_domain->time_domain() : Temporal::AudioTime;
}
friend class Drag;
friend class RegionCutDrag;
friend class RegionDrag;