Skip to content
Snippets Groups Projects
Commit df97cd44 authored by Johannes Kung's avatar Johannes Kung
Browse files

Merge with branch halt_pop_up

parents 685ffbe1 42981b42
No related branches found
No related tags found
1 merge request!9Tick break points
......@@ -487,19 +487,6 @@ class GUI(QMainWindow):
if self.update_all_values:
self.updateCpuListeners()
# If a breakpoint halted the program, inform the user
# Update other visuals and set the cpu to the correct state (not running)
if self.cpu.breakpoint_reached:
self.messageBox("Reached breakpoint: " + self.cpu.last_breakpoint.__str__())
# When the CPU is done we want to inform the user and update visuals
if self.cpu.should_halt():
# Only show halted message for larger steps that take time
# This is done so a user dosent have to close
# the message box after every small step
if steps > self.HALT_MESSAGE_THRESHOLD:
self.messageBox("The processor halted.")
# A signal of 0 steps signifies end of execution, i.e. the CPU has
# halted or run the specified amount of ticks
# => Enable the relevant parts of the GUI again
......@@ -508,6 +495,14 @@ class GUI(QMainWindow):
self.setDisabledWhenRunning(False)
self.updateCpuListeners()
# Inform user of reached break point
if self.cpu.breakpoint_reached:
self.messageBox("Reached breakpoint: " + self.cpu.last_breakpoint.__str__())
# Inform user of halt
if self.cpu.should_halt():
self.messageBox("The processor halted.")
def stopToolBarButtonClick(self) -> None:
"""
Tells the cpu to stop. It will then stop at an appropriate in its own thread.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment