strip_feedback (sur, true);
global_feedback (sur);
// need to add select start
- if(ControlProtocol::first_selected_stripable()) {
- _strip_select (ControlProtocol::first_selected_stripable(), get_address (msg));
- } else {
- _strip_select (session->master_out (), get_address (msg));
- }
+ _strip_select (0, get_address (msg));
}
strip_feedback(s, true);
global_feedback (s);
- if(ControlProtocol::first_selected_stripable()) {
- _strip_select (ControlProtocol::first_selected_stripable(), get_address (msg));
- } else {
- _strip_select (session->master_out (), get_address (msg));
- }
+ _strip_select (0, get_address (msg));
sel_send_pagesize (se_size, msg);
sel_plug_pagesize (pi_size, msg);
return 0;
// set bank and strip feedback
strip_feedback (s, true);
- if(ControlProtocol::first_selected_stripable()) {
- _strip_select (ControlProtocol::first_selected_stripable(), get_address (msg));
- } else {
- _strip_select (session->master_out (), get_address (msg));
- }
+ _strip_select (0, get_address (msg));
return 0;
}
// set bank and strip feedback
s->bank = 1;
strip_feedback (s, true);
- if(ControlProtocol::first_selected_stripable()) {
- _strip_select (ControlProtocol::first_selected_stripable(), get_address (msg));
- } else {
- _strip_select (session->master_out (), get_address (msg));
- }
+ _strip_select (0, get_address (msg));
return 0;
}
// Set global/master feedback
global_feedback (s);
- if(ControlProtocol::first_selected_stripable()) {
- _strip_select (ControlProtocol::first_selected_stripable(), get_address (msg));
- } else {
- _strip_select (session->master_out (), get_address (msg));
- }
+ _strip_select (0, get_address (msg));
return 0;
}
// Set global/master feedback
global_feedback (s);
- if(ControlProtocol::first_selected_stripable()) {
- _strip_select (ControlProtocol::first_selected_stripable(), get_address (msg));
- } else {
- _strip_select (session->master_out (), get_address (msg));
- }
+ _strip_select (0, get_address (msg));
return 0;
}
// Set global/master feedback
global_feedback (&s);
- if(ControlProtocol::first_selected_stripable()) {
- _strip_select (ControlProtocol::first_selected_stripable(), addr);
- } else {
- _strip_select (session->master_out (), addr);
- }
+ _strip_select (0, addr);
}
return &_surface[_surface.size() - 1];
if (observer_busy) {
return;
}
- if (!_select || (_select != ControlProtocol::first_selected_stripable())) {
- _select = ControlProtocol::first_selected_stripable();
- gui_selection_changed ();
- }
/*
* We have two different ways of working here:
* 1) banked: The controller has a bank of strips and only can deal
OSCSurface* sur = &_surface[it];
// find lo_address
lo_address addr = lo_address_new_from_url (sur->remote_url.c_str());
+ _strip_select (0, addr);
if (sur->cue) {
_cue_set (sur->aux, addr);
} else if (!sur->bank_size) {
// revert any expand to select
s->expand = 0;
s->expand_enable = false;
- _strip_select (ControlProtocol::first_selected_stripable(), addr);
+ _strip_select (0, addr);
s->strips = get_sorted_stripables(s->strip_types, s->cue);
s->nstrips = s->strips.size();
s->bank = bank_start;
if (s->feedback[0] || s->feedback[1]) {
-
- for (uint32_t i = 0; i < s->observers.size(); i++) {
- s->observers[i]->refresh_strip (false);
- }
+ strip_feedback (s, false);
}
bank_leds (s);
bank_dirty = false;
if (sur->expand_enable && sur->expand) {
strp = get_strip (sur->expand, get_address (msg));
} else {
- strp = ControlProtocol::first_selected_stripable();
+ strp = _select;
}
ctr = 8;
} else {
if (sur->expand_enable && sur->expand) {
strp = get_strip (sur->expand, get_address (msg));
} else {
- strp = ControlProtocol::first_selected_stripable();
+ strp = _select;
}
ctr = 8;
} else {
if (yn) {
s = get_strip (ssid, get_address (msg));
} else {
- s = ControlProtocol::first_selected_stripable();
+ s = _select;
}
return _strip_select (s, get_address (msg));
return -1;
}
OSCSurface *sur = get_surface(addr, true);
- if (s) {
- sur->select = s;
- s->DropReferences.connect (*this, MISSING_INVALIDATOR, boost::bind (&OSC::recalcbanks, this), this);
- } else if (sur->expand_enable) {
- // expand doesn't point to a stripable, turn it off and use select
- sur->expand = 0;
- sur->expand_enable = false;
- if (_select) {
- s = _select;
- sur->select = s;
+ if (!s) {
+ if (sur->expand_enable) {
+ // expand doesn't point to a stripable, turn it off and use select
+ sur->expand = 0;
+ sur->expand_enable = false;
}
+ if(ControlProtocol::first_selected_stripable()) {
+ s = ControlProtocol::first_selected_stripable();
+ } else {
+ s = session->master_out ();
+ }
+ _select = s;
}
+ sur->select = s;
+ s->DropReferences.connect (*this, MISSING_INVALIDATOR, boost::bind (&OSC::recalcbanks, this), this);
OSCSelectObserver* so = 0;
if (sur->feedback[13]) {
processor_changed (addr);
}
- for (uint32_t i = 0; i < sur->observers.size(); i++) {
- OSCRouteObserver* ro;
- if ((ro = dynamic_cast<OSCRouteObserver*>(sur->observers[i])) != 0) {
- ro->refresh_strip (false);
- }
- }
+ strip_feedback (sur, false);
return 0;
}
if (state && sur->expand) {
s = get_strip (sur->expand, get_address (msg));
} else {
- s = ControlProtocol::first_selected_stripable();
+ s = _select;
}
return _strip_select (s, get_address (msg));
return sel_send_fail ("eq_shape", id + 1, 0, get_address (msg));
}
-void
-OSC::gui_selection_changed ()
-{
- boost::shared_ptr<Stripable> strip = ControlProtocol::first_selected_stripable();
-
- if (strip) {
- _select = strip;
- for (uint32_t it = 0; it < _surface.size(); ++it) {
- OSCSurface* sur = &_surface[it];
- if(!sur->expand_enable) {
- lo_address addr = lo_address_new_from_url (sur->remote_url.c_str());
- _strip_select (strip, addr);
- }
- }
- }
-}
-
// timer callbacks
bool
OSC::periodic (void)