Fix ListBox drag-to-DAW, audio preview error feedback, and import filename preservation#24
Merged
Merged
Conversation
Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com> Agent-Logs-Url: https://github.com/audiohacking/acestep-vst/sessions/91d13e17-43b0-49b7-b537-7ac8b6db36fe
Copilot
AI
changed the title
[WIP] Fix drag-and-drop functionality for AUDIO files in plugin
Fix ListBox drag-to-DAW, audio preview error feedback, and import filename preservation
Mar 22, 2026
lmangani
marked this pull request as ready for review
March 22, 2026 23:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three bugs in the Library tab: drag-to-DAW never initiates, audio preview fails silently, and imported files are renamed with a timestamp instead of keeping their original name.
Drag-and-drop (root cause)
LibraryListBoxoverrodemouseDown/mouseDrag/mouseUpdirectly on theListBoxsubclass. JUCE routes all row interactions through an internalContentComponent(nested child ofListViewport), so those overrides never fire for row events —dragRow_was permanently-1.Fix: Replace the three overrides with a
DragHelper : public juce::MouseListenerregistered viaaddMouseListener(&dragHelper_, true). Thetrueflag captures events from all nested descendants. Coordinates are translated withe.getEventRelativeTo(&lb_)before callinggetRowContainingPosition(). Drag is initiated via the staticDragAndDropContainer::performExternalDragDropOfFiles()directly — no fragile parent-container lookup.Audio preview error feedback
previewLibraryEntry()wasvoidand failed silently on bad format or missing file. Changed to returnbool;onPreviewClicked()now callsshowFeedback("Preview failed…")on failure.Import filename preservation
importAudioFile()renamed every imported file toimport_YYYYMMDD_HHMMSS.ext. Fixed to use the original filename, appending_N(capped at 1000) only on collision.💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.