From 73a6cb7957267d5471a2ff39d7fcc2dfa1c3e705 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 27 May 2022 15:56:41 -0600 Subject: [PATCH] editor: add method to get time domain from any object with a ::time_domain() method --- gtk2_ardour/editor.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 761d39fce4..d08d9a0681 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -2474,6 +2474,16 @@ private: void remove_gap_marker_callback (Temporal::timepos_t at, Temporal::timecnt_t distance); + template + Temporal::TimeDomain drag_time_domain (T* thing_with_time_domain) { + return thing_with_time_domain ? thing_with_time_domain->time_domain() : Temporal::AudioTime; + } + + template + Temporal::TimeDomain drag_time_domain (boost::shared_ptr 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;