controllers need to be updated when tracks are added so they can rebuild the route...
authorBen Loftis <ben@glw.com>
Wed, 2 May 2007 19:06:56 +0000 (19:06 +0000)
committerBen Loftis <ben@glw.com>
Wed, 2 May 2007 19:06:56 +0000 (19:06 +0000)
git-svn-id: svn://localhost/ardour2/trunk@1777 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/surfaces/control_protocol/control_protocol.cc
libs/surfaces/control_protocol/control_protocol/control_protocol.h

index bb8ada746f5bf0254667e12ce80a9d552f073b05..8456654f20c2e003e33099fd5ad410c1e8ddeb70 100644 (file)
@@ -38,12 +38,19 @@ ControlProtocol::ControlProtocol (Session& s, string str)
          _name (str)
 {
        _active = false;
+       session->RouteAdded.connect (mem_fun(*this, &ControlProtocol::add_strip));
 }
 
 ControlProtocol::~ControlProtocol ()
 {
 }
 
+void
+ControlProtocol::add_strip (std::list<boost::shared_ptr<ARDOUR::Route> >)
+{
+       route_list_changed();
+}
+       
 void
 ControlProtocol::next_track (uint32_t initial_id)
 {
index c0961645ab4fdf42f2d3b2d6a958ab15155d5863..b787aeeb8f65ca5247a571217a2a9a1a485f454d 100644 (file)
@@ -47,6 +47,8 @@ class ControlProtocol : public sigc::trackable, public Stateful, public BasicUI
        virtual int set_feedback (bool yn) { return 0; }
        virtual bool get_feedback () const { return false; }
 
+       virtual void route_list_changed () {}
+
        sigc::signal<void> ActiveChanged;
 
        /* signals that a control protocol can emit and other (presumably graphical)
@@ -101,6 +103,8 @@ class ControlProtocol : public sigc::trackable, public Stateful, public BasicUI
        std::string _name;
        bool _active;
 
+       void add_strip (std::list<boost::shared_ptr<ARDOUR::Route> >);
+
        void next_track (uint32_t initial_id);
        void prev_track (uint32_t initial_id);
 };