diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-04-11 09:46:45 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-31 15:30:40 -0400 |
commit | b042072df4fcf8fd036965d2c9f5d17c34e0d2c1 (patch) | |
tree | 0c80ad20ce236d3599fe8da6aebd48cf5c0c154d /libs/ardour/ardour/automation_control.h | |
parent | b2b5c965c854d222f70080de5fcafb10b75ff40b (diff) |
fix logic for removing an AutomationControl from a ControlGroup
Diffstat (limited to 'libs/ardour/ardour/automation_control.h')
-rw-r--r-- | libs/ardour/ardour/automation_control.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h index d84f0a091f..a2eff17d9a 100644 --- a/libs/ardour/ardour/automation_control.h +++ b/libs/ardour/ardour/automation_control.h @@ -33,10 +33,12 @@ #include "evoral/types.hpp" #include "evoral/Control.hpp" -#include "ardour/libardour_visibility.h" #include "ardour/automation_list.h" +#include "ardour/control_group_member.h" #include "ardour/parameter_descriptor.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { class Session; @@ -49,6 +51,7 @@ class LIBARDOUR_API AutomationControl : public PBD::Controllable , public Evoral::Control , public boost::enable_shared_from_this<AutomationControl> + , public ControlGroupMember { public: AutomationControl(ARDOUR::Session&, @@ -116,8 +119,6 @@ class LIBARDOUR_API AutomationControl const ARDOUR::Session& session() const { return _session; } void commit_transaction (bool did_write); - void set_group (boost::shared_ptr<ControlGroup>); - protected: ARDOUR::Session& _session; boost::shared_ptr<ControlGroup> _group; @@ -132,6 +133,14 @@ class LIBARDOUR_API AutomationControl */ virtual void actually_set_value (double value, PBD::Controllable::GroupControlDisposition); + + private: + /* I am unclear on why we have to make ControlGroup a friend in order + to get access to the ::set_group() method when it is already + declared to be a friend in ControlGroupMember. Oh well. + */ + friend class ControlGroup; + void set_group (boost::shared_ptr<ControlGroup>); }; class SlavableAutomationControl : public AutomationControl |