controllers need to be updated when tracks are added so they can rebuild the route table

git-svn-id: svn://localhost/ardour2/trunk@1777 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Ben Loftis 2007-05-02 19:06:56 +00:00
parent 66d083ef80
commit dbffba81c5
2 changed files with 11 additions and 0 deletions

View file

@ -38,12 +38,19 @@ ControlProtocol::ControlProtocol (Session& s, string str)
_name (str) _name (str)
{ {
_active = false; _active = false;
session->RouteAdded.connect (mem_fun(*this, &ControlProtocol::add_strip));
} }
ControlProtocol::~ControlProtocol () ControlProtocol::~ControlProtocol ()
{ {
} }
void
ControlProtocol::add_strip (std::list<boost::shared_ptr<ARDOUR::Route> >)
{
route_list_changed();
}
void void
ControlProtocol::next_track (uint32_t initial_id) ControlProtocol::next_track (uint32_t initial_id)
{ {

View file

@ -47,6 +47,8 @@ class ControlProtocol : public sigc::trackable, public Stateful, public BasicUI
virtual int set_feedback (bool yn) { return 0; } virtual int set_feedback (bool yn) { return 0; }
virtual bool get_feedback () const { return false; } virtual bool get_feedback () const { return false; }
virtual void route_list_changed () {}
sigc::signal<void> ActiveChanged; sigc::signal<void> ActiveChanged;
/* signals that a control protocol can emit and other (presumably graphical) /* 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; std::string _name;
bool _active; bool _active;
void add_strip (std::list<boost::shared_ptr<ARDOUR::Route> >);
void next_track (uint32_t initial_id); void next_track (uint32_t initial_id);
void prev_track (uint32_t initial_id); void prev_track (uint32_t initial_id);
}; };