Skip to content

Commit

Permalink
Bugfix kit row audition pad rendering (#1505)
Browse files Browse the repository at this point in the history
  • Loading branch information
seangoodvibes authored and m-m-adams committed Mar 20, 2024
1 parent 89d10b1 commit 338749a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/deluge/gui/views/automation_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ void AutomationView::renderLove(RGB* image, uint8_t occupancyMask[], int32_t yDi
}
}

// defers to audio clip or instrument clip sidebar render functions
// defers to arranger, audio clip or instrument clip sidebar render functions
// depending on the active clip
bool AutomationView::renderSidebar(uint32_t whichRows, RGB image[][kDisplayWidth + kSideBarWidth],
uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth]) {
Expand Down Expand Up @@ -2236,10 +2236,6 @@ void AutomationView::auditionPadAction(int32_t velocity, int32_t yDisplay, bool
drum = modelStackWithNoteRowOnCurrentClip->getNoteRow()->drum;
Drum* selectedDrum = ((Kit*)output)->selectedDrum;
if (selectedDrum != drum) {
// But not if we're actually not on this screen
if (getCurrentUI() != this) {
return;
}
selectedDrumChanged = true;
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/deluge/gui/views/instrument_clip_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4252,8 +4252,12 @@ void InstrumentClipView::drawAuditionSquare(uint8_t yDisplay, RGB thisImage[]) {

// Kit - draw "selected Drum"
if (getCurrentOutputType() == OutputType::KIT) {
if (getCurrentUI() != this) {
// we're not the top-level UI, just turn the pad off
// only turn selected drum off if we're not currently in that UI and affect entire is on
// we turn it off when affect entire is on because the selected drum is not relevant in that context
// e.g. if you're in the affect entire menu, you're not editing params for the selected drum
UI* currentUI = getCurrentUI();
bool isInstrumentClipView = ((currentUI == &instrumentClipView) || (currentUI == &automationView));
if (!isInstrumentClipView && instrumentClipView.getAffectEntire()) {
thisColour = colours::black;
return;
}
Expand Down

0 comments on commit 338749a

Please sign in to comment.