From bbca6b78f78fb77adf5086669e9b36a0a8b954f9 Mon Sep 17 00:00:00 2001 From: Jonathan Perret Date: Tue, 3 Dec 2024 23:41:59 +0100 Subject: [PATCH] Remove "step" code from CommunicationMock This did not really work, due to running on a non-UI thread. --- .../main/ayab/engine/communication_mock.py | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/main/python/main/ayab/engine/communication_mock.py b/src/main/python/main/ayab/engine/communication_mock.py index f17595ac..0c265355 100644 --- a/src/main/python/main/ayab/engine/communication_mock.py +++ b/src/main/python/main/ayab/engine/communication_mock.py @@ -23,20 +23,17 @@ import logging from time import sleep -from PySide6.QtWidgets import QMessageBox - from .communication import Communication, Token class CommunicationMock(Communication): """Class Handling the mock communication protocol.""" - def __init__(self, delay=True, step=False) -> None: + def __init__(self, delay=True) -> None: """Initialize communication.""" logging.basicConfig(level=logging.DEBUG) self.logger = logging.getLogger(type(self).__name__) self.__delay = delay - self.__step = step self.reset() def __del__(self) -> None: @@ -111,20 +108,6 @@ def update_API6(self) -> tuple[bytes | None, Token, int]: self.rx_msg_list.append(reqLine) if self.__delay: sleep(1) # wait for knitting progress dialog to update - # step through output line by line - if self.__step: - # pop up box waits for user input before moving on to next line - msg = QMessageBox() - msg.setIcon(QMessageBox.Icon.Information) - msg.setText("Line number = " + str(self.__line_count)) - msg.setStandardButtons( - QMessageBox.StandardButton.Ok - | QMessageBox.StandardButton.Cancel - ) - ret = None - ret = msg.exec_() - while ret is None: - pass else: self.__started_row = True if len(self.rx_msg_list) > 0: