From e881d9d84839e4a12c68482c3187d41ed3b89689 Mon Sep 17 00:00:00 2001 From: Severin Leonhardt Date: Wed, 20 May 2026 20:47:08 +0200 Subject: [PATCH] Fix dialogs that need to be modal There are two dialogs which are expected to block and not return immediately. They are broken since 45bf80fc when the code base was updated to JUCE 6.1.0. Refactoring those to be asynchronous isn't trivial. To keep them working for now `JUCE_MODAL_LOOPS_PERMITTED` is being set to `1`, like it was before the update. Additionally, one dialog was wrongfully changed to be async. This was also reverted back. --- CMakeLists.txt | 1 + Changelog.md | 2 ++ Source/TrackUi.cpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e184e92b..c2632eb4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,6 +139,7 @@ target_compile_definitions(MStarPlayer PRIVATE JUCE_WEB_BROWSER=0 JUCE_USE_CURL=0 JUCE_USE_CDREADER=1 + JUCE_MODAL_LOOPS_PERMITTED=1 JUCE_APPLICATION_NAME_STRING="$" JUCE_APPLICATION_VERSION_STRING="$" ) diff --git a/Changelog.md b/Changelog.md index 371519f5..1291ed50 100644 --- a/Changelog.md +++ b/Changelog.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +* The dialogs to edit or remove files of a track work again. + ## [1.3.0] - 2026-02-07 ### Changed diff --git a/Source/TrackUi.cpp b/Source/TrackUi.cpp index 0b10e724..5378940a 100644 --- a/Source/TrackUi.cpp +++ b/Source/TrackUi.cpp @@ -181,7 +181,7 @@ void TrackUi::buttonClicked(juce::Button* button) juce::File file(m_track.getTrackConfig().file); m_track.unloadFile(); - juce::AlertWindow::showMessageBoxAsync(juce::AlertWindow::NoIcon, + juce::AlertWindow::showMessageBox(juce::AlertWindow::NoIcon, TRANS("Audio editor launched"), TRANS("Modify the file in the audio editor. Click on 'ok' after the file was saved to load it " "again."));