From be6bfd12ebfa9b3c394fc67c8f3299fe0755c11b Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 12 Mar 2017 16:54:18 +0100 Subject: Preparations to keep track of stripable color-dialogs. This follows the same concept as plugin-UIs (keep a pointer in the backend) to prevent multiple instances to be created from various TAVs and RouteUIs (mixer, editor-mixer, meterbridge,..) --- libs/ardour/ardour/stripable.h | 7 +++++++ libs/ardour/stripable.cc | 1 + 2 files changed, 8 insertions(+) diff --git a/libs/ardour/ardour/stripable.h b/libs/ardour/ardour/stripable.h index 92cf7bdced..099a048016 100644 --- a/libs/ardour/ardour/stripable.h +++ b/libs/ardour/ardour/stripable.h @@ -32,6 +32,8 @@ #include "ardour/session_object.h" #include "ardour/libardour_visibility.h" +class StripableColorDialog; + namespace ARDOUR { class AutomationControl; @@ -182,8 +184,13 @@ class LIBARDOUR_API Stripable : public SessionObject { virtual boost::shared_ptr monitor_control() const = 0; + StripableColorDialog* active_color_picker() const { return _active_color_picker; } + void set_active_color_picker (StripableColorDialog* d) { _active_color_picker = d; } + protected: PresentationInfo _presentation_info; + private: + StripableColorDialog* _active_color_picker; }; } diff --git a/libs/ardour/stripable.cc b/libs/ardour/stripable.cc index 135526f2a3..c2f5b7239a 100644 --- a/libs/ardour/stripable.cc +++ b/libs/ardour/stripable.cc @@ -35,6 +35,7 @@ using std::string; Stripable::Stripable (Session& s, string const & name, PresentationInfo const & pi) : SessionObject (s, name) , _presentation_info (pi) + , _active_color_picker (0) { } -- cgit v1.2.3