SynthstromAudible / DelugeFirmware

https://synthstromaudible.github.io/DelugeFirmware/
GNU General Public License v3.0
568 stars 97 forks source link

Audio clip file browser bug #2885

Closed panicmechanic closed 1 week ago

panicmechanic commented 1 week ago

Please describe the problem:

When selecting a file for an audio clip: If SHIFT is on, the user recieves a "Can only use for brand new kit" warning, as if the Deluge thinks you're asking it to slice the sample into a kit.

What is the expected behavior?

For the sample to be selected and the menu closed.

Is there a relevant Pull request?

No response

What hardware did you reproduce it with?

OLED

What firmware did you reproduce it with?

Beta

What is the firmware name:

No response

If possible provide the steps to reproduce the issue and upload additional media:

  1. Create and enter an audio clip
  2. Turn on sticky shift
  3. Hit "browse" shortcut
  4. Select a file
  5. Recieve warning
seangoodvibes commented 1 week ago

Fix is here: https://github.com/SynthstromAudible/DelugeFirmware/blob/5d5397a20494304c2c2fc9745f2a0ed6f186e56e/src/deluge/gui/ui/browser/sample_browser.cpp#L375

instead of

if (Buttons::isShiftButtonPressed()) {

it should be:

if (soundEditor.editingKit() && Buttons::isShiftButtonPressed()) {

and you can remove the first part of this line: https://github.com/SynthstromAudible/DelugeFirmware/blob/5d5397a20494304c2c2fc9745f2a0ed6f186e56e/src/deluge/gui/ui/browser/sample_browser.cpp#L379C4-L379C54

remove: getCurrentClip()->type == ClipType::INSTRUMENT &&