From 9606f81bc84cf061a96d9b4a5b444f35b13a0079 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 14 Mar 2024 12:40:44 +0100 Subject: [PATCH] ScreenRecorder: Fix "show dialog or settings" logic If the user selects "Record Screen" while the ffmpeg/ffprobe are not set, the ScreenRecorder settings are shown. The ScreenRecorder dialog did open up after the settings page, even if the user just pressed OK without setting the tools. With this change, not the settings page return value determines whether to show the ScreenRecorder dialog, but rather a second check if the tools are set/registered. Change-Id: I35b8f4e3afe7ea5e6834fcff74ce8f73d3a115b4 Reviewed-by: Reviewed-by: Christian Stenger --- src/plugins/screenrecorder/screenrecorderplugin.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/screenrecorder/screenrecorderplugin.cpp b/src/plugins/screenrecorder/screenrecorderplugin.cpp index 662e8cc24c3..a816a276bcf 100644 --- a/src/plugins/screenrecorder/screenrecorderplugin.cpp +++ b/src/plugins/screenrecorder/screenrecorderplugin.cpp @@ -135,9 +135,11 @@ public: private: void showDialogOrSettings() { - if (!Internal::settings().toolsRegistered() && - !Core::ICore::showOptionsDialog(Constants::TOOLSSETTINGSPAGE_ID)) { - return; + if (!Internal::settings().toolsRegistered()) { + // Show options if ffmpeg/ffprobe are neither autodetected nor manually set + Core::ICore::showOptionsDialog(Constants::TOOLSSETTINGSPAGE_ID); + if (!Internal::settings().toolsRegistered()) + return; // User did not set ffmpeg/ffprobe } ScreenRecorderDialog::showDialog();