From 488d0722bd561c0adcb8ceacbfeda7ff9584cf93 Mon Sep 17 00:00:00 2001 From: Maurice Hieronymus Date: Sun, 11 Jul 2021 17:26:16 +0200 Subject: [PATCH] HackStudio: Disable run button while debugging This commit disables the run button while we are in debug mode. Otherwise the stop button gets disabled when we run the program while we are in debug mode. This would prevent us from exiting the debug mode. --- Userland/DevTools/HackStudio/HackStudioWidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index 2b0916a786..ceec1fe9bf 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -638,6 +638,7 @@ NonnullRefPtr HackStudioWidget::create_debug_action() m_debugger_thread = Threading::Thread::construct(Debugger::start_static); m_debugger_thread->start(); m_stop_action->set_enabled(true); + m_run_action->set_enabled(false); }); } @@ -687,6 +688,7 @@ void HackStudioWidget::initialize_debugger() m_debug_info_widget->program_stopped(); m_disassembly_widget->program_stopped(); m_stop_action->set_enabled(false); + m_run_action->set_enabled(true); m_debugger_thread.clear(); HackStudioWidget::hide_action_tabs(); GUI::MessageBox::show(window(), "Program Exited", "Debugger", GUI::MessageBox::Type::Information);