0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 03:31:50 +02:00

fix: motor_example.py user is blocked to duplicate last entry in start/end mode if end coordinate was not defined

This commit is contained in:
wyzula-jan
2023-09-19 14:16:41 +02:00
parent 08f508f4c3
commit 418480f1fc

View File

@ -739,6 +739,16 @@ class MotorApp(QWidget):
table.resizeColumnsToContents()
def duplicate_last_row(self, table: QtWidgets.QTableWidget) -> None:
if self.is_next_entry_end is True:
msgBox = QMessageBox()
msgBox.setIcon(QMessageBox.Warning)
msgBox.setText("The end coordinates were not set for previous entry!")
msgBox.setStandardButtons(QMessageBox.Ok)
returnValue = msgBox.exec()
if returnValue == QMessageBox.Ok:
return
last_row = table.rowCount() - 1
if last_row == -1:
return