provide a better method to decide if a trigger(slot) is occupied

This is necessary with clip recording because for some short time after recording,
a trigger may be playable despite not yet having a region.

libs edition.
This commit is contained in:
Paul Davis 2024-10-02 13:46:52 -06:00
parent e089953e78
commit 1e8b2c521c
7 changed files with 30 additions and 25 deletions

View file

@ -1584,7 +1584,7 @@ LaunchPadPro::trigger_property_change (PropertyChange pc, Trigger* t)
MidiByteArray msg;
std::shared_ptr<Route> r = session->get_remote_nth_route (scroll_x_offset + x);
if (!r || !t->region()) {
if (!r || !t->playable()) {
msg.push_back (0x90);
msg.push_back (pid);
msg.push_back (0x0);
@ -1659,7 +1659,7 @@ LaunchPadPro::map_triggerbox (int x)
TriggerPtr t = session->trigger_at (xp, yp);
if (!t || !t->region()) {
if (!t || !t->playable()) {
msg[2] = 0x0;
} else {
msg[2] = palette_index;