0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-13 19:21:50 +02:00

refactor: change order of columns

This commit is contained in:
wyzula-jan
2023-09-06 15:02:46 +02:00
parent 1235294b03
commit 3132b4fb4d
2 changed files with 5 additions and 5 deletions

View File

@ -516,7 +516,7 @@
</property>
<column>
<property name="text">
<string>Tag</string>
<string>Move</string>
</property>
</column>
<column>
@ -536,7 +536,7 @@
</column>
<column>
<property name="text">
<string>Move</string>
<string>Tag</string>
</property>
</column>
</widget>

View File

@ -530,7 +530,7 @@ class MotorApp(QWidget):
lambda state, widget=checkBox: self.toggle_point_visibility(state, widget)
)
table.setItem(current_row_count, 0, QtWidgets.QTableWidgetItem(str(tag)))
table.setItem(current_row_count, 4, QtWidgets.QTableWidgetItem(str(tag)))
table.setCellWidget(current_row_count, 1, checkBox)
# Apply validator to x and y coordinate QTableWidgetItem
@ -546,7 +546,7 @@ class MotorApp(QWidget):
current_row_count, 3, QtWidgets.QTableWidgetItem(str(f"{coordinates[1]:.{precision}f}"))
)
table.setCellWidget(current_row_count, 4, button)
table.setCellWidget(current_row_count, 0, button)
button.clicked.connect(partial(self.move_to_row_coordinates, table, current_row_count))
@ -674,7 +674,7 @@ class MotorApp(QWidget):
# Update the 'Go' buttons
for row in range(self.tableWidget_coordinates.rowCount()):
button = self.tableWidget_coordinates.cellWidget(row, 4)
button = self.tableWidget_coordinates.cellWidget(row, 0)
button.clicked.disconnect()
button.clicked.connect(
partial(self.move_to_row_coordinates, self.tableWidget_coordinates, row)