Skip to content

Commit

Permalink
Disconnect handlers on clear_queue
Browse files Browse the repository at this point in the history
  • Loading branch information
machinewrapped committed Jun 4, 2024
1 parent d8c0f7d commit 59c68d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions GUI/CommandQueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ def _clear_command_queue(self):
self.logger.debug(f"Clearing command queue")

with QMutexLocker(self.mutex):
# Disconnect the command executed handler
for command in self.queue:
command.commandExecuted.disconnect(self._on_command_executed)

# Remove commands that haven't been started
self.queue = [command for command in self.queue if command.started]

Expand Down

0 comments on commit 59c68d6

Please sign in to comment.