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.
This commit is contained in:
Maurice Hieronymus 2021-07-11 17:26:16 +02:00 committed by Gunnar Beutner
parent 7d38057705
commit 488d0722bd
Notes: sideshowbarker 2024-07-18 09:12:56 +09:00

View file

@ -638,6 +638,7 @@ NonnullRefPtr<GUI::Action> 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);