diff --git a/scripts/Engineering/gui/engineering_diffraction/tabs/fitting/data_handling/data_view.py b/scripts/Engineering/gui/engineering_diffraction/tabs/fitting/data_handling/data_view.py index 8f07ccbb6bd340c23c9488669f240191e08fd07f..92d38a7ad09196ec5d210cd3636a15ba1877d22a 100644 --- a/scripts/Engineering/gui/engineering_diffraction/tabs/fitting/data_handling/data_view.py +++ b/scripts/Engineering/gui/engineering_diffraction/tabs/fitting/data_handling/data_view.py @@ -53,9 +53,17 @@ class FittingDataView(QtWidgets.QWidget, Ui_data): def add_table_row(self, run_no, bank, checked): row_no = self.table_selection.rowCount() self.table_selection.insertRow(row_no) - self.table_selection.setItem(row_no, 0, QtWidgets.QTableWidgetItem(str(run_no))) - self.table_selection.setItem(row_no, 1, QtWidgets.QTableWidgetItem(str(bank))) + + name_item = QtWidgets.QTableWidgetItem(str(run_no)) + name_item.setFlags(name_item.flags() & ~QtCore.Qt.ItemIsEditable) + self.table_selection.setItem(row_no, 0, name_item) + + bank_item = QtWidgets.QTableWidgetItem(str(bank)) + bank_item.setFlags(name_item.flags() & ~QtCore.Qt.ItemIsEditable) + self.table_selection.setItem(row_no, 1, bank_item) + check_box = QtWidgets.QTableWidgetItem() + check_box.setFlags(check_box.flags() & ~QtCore.Qt.ItemIsEditable) if checked: check_box.setCheckState(QtCore.Qt.Checked) else: