Skip to content

Commit f2b0f32

Browse files
Remove "step" code from CommunicationMock
This did not really work, due to running on a non-UI thread.
1 parent a3db044 commit f2b0f32

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

src/main/python/main/ayab/engine/communication_mock.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,17 @@
2323
import logging
2424
from time import sleep
2525

26-
from PySide6.QtWidgets import QMessageBox
27-
2826
from .communication import Communication, Token
2927

3028

3129
class CommunicationMock(Communication):
3230
"""Class Handling the mock communication protocol."""
3331

34-
def __init__(self, delay=True, step=False) -> None:
32+
def __init__(self, delay=True) -> None:
3533
"""Initialize communication."""
3634
logging.basicConfig(level=logging.DEBUG)
3735
self.logger = logging.getLogger(type(self).__name__)
3836
self.__delay = delay
39-
self.__step = step
4037
self.reset()
4138

4239
def __del__(self) -> None:
@@ -122,20 +119,6 @@ def update_API6(self) -> tuple[bytes | None, Token, int]:
122119
self.rx_msg_list.append(reqLine)
123120
if self.__delay:
124121
sleep(1) # wait for knitting progress dialog to update
125-
# step through output line by line
126-
if self.__step:
127-
# pop up box waits for user input before moving on to next line
128-
msg = QMessageBox()
129-
msg.setIcon(QMessageBox.Icon.Information)
130-
msg.setText("Line number = " + str(self.__line_count))
131-
msg.setStandardButtons(
132-
QMessageBox.StandardButton.Ok
133-
| QMessageBox.StandardButton.Cancel
134-
)
135-
ret = None
136-
ret = msg.exec_()
137-
while ret is None:
138-
pass
139122
else:
140123
self.__started_row = True
141124
if len(self.rx_msg_list) > 0:

0 commit comments

Comments
 (0)