LCXL: Fix two crashes
* fix a crash when accessing VCAs * fix a crash when being at the end of available stripables * unify for-loop constructs
This commit is contained in:
parent
4111f66b25
commit
c3d0c80f68
@ -503,15 +503,16 @@ LaunchControlXL::solo_iso_led_bank ()
|
||||
if (!(buttons_down.find(Device) != buttons_down.end())) {
|
||||
return;
|
||||
} else {
|
||||
for (int y = 0; y < stripable_counter; ++y) {
|
||||
TrackButton* b = focus_button_by_column(y);
|
||||
|
||||
if (stripable[y]->solo_isolate_control()->get_value()) {
|
||||
b->set_color(RedFull);
|
||||
} else {
|
||||
b->set_color(Off);
|
||||
for (int n = 0; n < stripable_counter; ++n) {
|
||||
TrackButton* b = focus_button_by_column(n);
|
||||
if (stripable[n] && stripable[n]->solo_isolate_control()) {
|
||||
if (stripable[n]->solo_isolate_control()->get_value()) {
|
||||
b->set_color(RedFull);
|
||||
} else {
|
||||
b->set_color(Off);
|
||||
}
|
||||
write (b->state_msg());
|
||||
}
|
||||
write (b->state_msg());
|
||||
}
|
||||
LaunchControlXL::set_refresh_leds_flag(true);
|
||||
}
|
||||
@ -539,10 +540,12 @@ LaunchControlXL::master_send_led_bank ()
|
||||
|
||||
for (int n = 0; n < stripable_counter; ++n) {
|
||||
TrackButton* b = control_button_by_column(n);
|
||||
if (stripable[n]->master_send_enable_controllable()->get_value()) {
|
||||
b->set_color(GreenFull);
|
||||
} else {
|
||||
b->set_color(Off);
|
||||
if (stripable[n] && stripable[n]->master_send_enable_controllable()) {
|
||||
if (stripable[n]->master_send_enable_controllable()->get_value()) {
|
||||
b->set_color(GreenFull);
|
||||
} else {
|
||||
b->set_color(Off);
|
||||
}
|
||||
}
|
||||
write (b->state_msg());
|
||||
}
|
||||
|
@ -899,7 +899,9 @@ LaunchControlXL::switch_bank (uint32_t base)
|
||||
stripable[n]->presentation_info().PropertyChanged.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::stripable_property_change, this, _1, n), lcxl);
|
||||
stripable[n]->solo_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::solo_changed, this, n), lcxl);
|
||||
stripable[n]->mute_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::mute_changed, this, n), lcxl);
|
||||
stripable[n]->solo_isolate_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::solo_iso_changed, this,n ), lcxl);
|
||||
if (stripable[n]->solo_isolate_control()) { /*VCAs are stripables without isolate solo */
|
||||
stripable[n]->solo_isolate_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::solo_iso_changed, this,n ), lcxl);
|
||||
}
|
||||
#ifdef MIXBUS
|
||||
if (stripable[n]->master_send_enable_controllable()) {
|
||||
stripable[n]->master_send_enable_controllable()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::master_send_changed, this,n ), lcxl);
|
||||
|
Loading…
Reference in New Issue
Block a user