* Depending on individual strips to watch the selection property is prone to failure.
* Stripable_selection_changed() is called when a selection operation is completed.
void
MackieControlProtocol::stripable_selection_changed ()
{
- boost::shared_ptr<Stripable> s = first_selected_stripable ();
+ //this function is called after the stripable selection is "stable", so this is the place to check surface selection state
+ for (Surfaces::iterator si = surfaces.begin(); si != surfaces.end(); ++si) {
+ (*si)->update_strip_selection ();
+ }
+ boost::shared_ptr<Stripable> s = first_selected_stripable ();
if (s) {
check_fader_automation_state ();
if (what_changed.contains (ARDOUR::Properties::name)) {
show_stripable_name ();
}
+}
- if (what_changed.contains (ARDOUR::Properties::selected)) {
- if (_stripable) {
- _surface->write (_select->set_state (_stripable->is_selected()));
- }
+void
+Strip::update_selection_state ()
+{
+ if(_stripable) {
+ _surface->write (_select->set_state (_stripable->is_selected()));
}
}
case 2:
eq_band = global_pos;
pc = r->eq_gain_controllable (eq_band);
+ band_name = r->eq_band_name (eq_band);
param = EQGain;
break;
}
void notify_metering_state_changed();
+ void update_selection_state ();
+
void block_screen_display_for (uint32_t msecs);
void block_vpot_mode_display_for (uint32_t msecs);
}
}
+void
+Surface::update_strip_selection ()
+{
+ Strips::iterator s = strips.begin();
+ for ( ; s != strips.end(); ++s) {
+ (*s)->update_selection_state();
+ }
+}
+
void
Surface::map_stripables (const vector<boost::shared_ptr<Stripable> >& stripables)
{
void map_stripables (const std::vector<boost::shared_ptr<ARDOUR::Stripable> >&);
+ void update_strip_selection ();
+
const MidiByteArray& sysex_hdr() const;
void periodic (ARDOUR::microseconds_t now_usecs);