Skip to content

Commit

Permalink
Bugfix: handle case of indexed params (#723)
Browse files Browse the repository at this point in the history
* handle case of indexed params

* better fix
  • Loading branch information
m-m-adams authored Nov 17, 2023
1 parent 45f5425 commit dba3e3b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/deluge/gui/ui/sound_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,18 +432,23 @@ void SoundEditor::exitCompletely() {
}

bool SoundEditor::findPatchedParam(int32_t paramLookingFor, int32_t* xout, int32_t* yout) {
bool found = false;
for (int32_t x = 0; x < 15; x++) {
for (int32_t y = 0; y < kDisplayHeight; y++) {
if (paramShortcutsForSounds[x][y] && paramShortcutsForSounds[x][y] != comingSoonMenu
&& ((MenuItem*)paramShortcutsForSounds[x][y])->getPatchedParamIndex() == paramLookingFor) {

*xout = x;
*yout = y;
return true;

if ((x & 1) == currentSourceIndex) {
//check we're on the corretc index
return true;
}
}
}
}
return false;
return found;
}

void SoundEditor::updateSourceBlinks(MenuItem* currentItem) {
Expand Down

0 comments on commit dba3e3b

Please sign in to comment.