_last_bank[i] = 0;
}
- PresentationInfo::Change.connect (gui_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_presentation_info_changed, this), this);
+ PresentationInfo::Change.connect (gui_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_presentation_info_changed, this, _1), this);
_instance = this;
}
void
-MackieControlProtocol::notify_presentation_info_changed ()
+MackieControlProtocol::notify_presentation_info_changed (PBD::PropertyChange const & what_changed)
{
+ PBD::PropertyChange order_or_hidden;
+
+ order_or_hidden.add (Properties::hidden);
+ order_or_hidden.add (Properties::order);
+
+ if (!what_changed.contains (order_or_hidden)) {
+ return;
+ }
+
{
Glib::Threads::Mutex::Lock lm (surfaces_lock);
}
}
- Sorted sorted = get_sorted_stripables();
- uint32_t sz = n_strips();
-
- // if a remote id has been moved off the end, we need to shift
- // the current bank backwards.
-
- if (sorted.size() - _current_initial_bank < sz) {
- // but don't shift backwards past the zeroth channel
- if (sorted.size() < sz) { // avoid unsigned math mistake below
- (void) switch_banks(0, true);
- } else {
- (void) switch_banks (max((Sorted::size_type) 0, sorted.size() - sz), true);
- }
- } else {
- // Otherwise just refresh the current bank
- refresh_current_bank();
- }
+ refresh_current_bank();
}
///////////////////////////////////////////
void notify_routes_added (ARDOUR::RouteList &);
void notify_vca_added (ARDOUR::VCAList &);
- void notify_presentation_info_changed();
+ void notify_presentation_info_changed(PBD::PropertyChange const &);
void recalibrate_faders ();
void toggle_backlight ();