From 17c78be334f8ce153838df6d5562d3cc8cd4f77a Mon Sep 17 00:00:00 2001 From: Nick Miller Date: Thu, 3 Jun 2021 15:18:54 -0700 Subject: SoundPlayer: Enable stop button when play button clicked Previously, if you play a file, then stop, then play again, the stop button will be permanently disabled until you open a file again. The stop button should be enabled whenever a file is loaded. This commit fixes the GUI bug by enabling the stop button whenever the play button is clicked (if a file is currently loaded). --- Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Userland/Applications/SoundPlayer') diff --git a/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp b/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp index 778fdc0dcb..fc67aab216 100644 --- a/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp +++ b/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp @@ -72,6 +72,7 @@ SoundPlayerWidgetAdvancedView::SoundPlayerWidgetAdvancedView(GUI::Window& window bool paused = this->manager().toggle_pause(); set_paused(paused); m_play_button->set_icon(paused ? *m_play_icon : *m_pause_icon); + m_stop_button->set_enabled(has_loaded_file()); }; m_stop_button = menubar.add(); -- cgit v1.2.3