Preparations to keep track of stripable color-dialogs.
authorRobin Gareus <robin@gareus.org>
Sun, 12 Mar 2017 15:54:18 +0000 (16:54 +0100)
committerRobin Gareus <robin@gareus.org>
Sun, 12 Mar 2017 15:54:18 +0000 (16:54 +0100)
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
libs/ardour/stripable.cc

index 92cf7bdced71720943b67540d76595f94ced3e7b..099a048016c1c357d2ce0c80e0373313cee25a3b 100644 (file)
@@ -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<MonitorProcessor> 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;
 };
 
 }
index 135526f2a3dc12900654ea4cbe64142796c63fc0..c2f5b7239ad30c15712d64af434da6d43a2be670 100644 (file)
@@ -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)
 {
 }