session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSC::notify_routes_added, this, _1), this);
// receive VCAs added
session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSC::notify_vca_added, this, _1), this);
+ // order changed
+ PresentationInfo::Change.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&OSC::recalcbanks, this), this);
+
return 0;
}
void
OSC::recalcbanks ()
+{
+ tick = false;
+ bank_dirty = true;
+}
+
+void
+OSC::_recalcbanks ()
{
for (uint32_t it = 0; it < _surface.size(); ++it) {
OSCSurface* sur = &_surface[it];
OSC::periodic (void)
{
if (!tick) {
+ usleep(100); // let flurry of signals subside
if (bank_dirty) {
- recalcbanks ();
+ _recalcbanks ();
+ bank_dirty = false;
+ tick = true;
}
}
void route_name_changed (const PBD::PropertyChange&, boost::weak_ptr<ARDOUR::Route> r, lo_address addr);
void recalcbanks ();
+ void _recalcbanks ();
void notify_routes_added (ARDOUR::RouteList &);
void notify_vca_added (ARDOUR::VCAList &);