diff --git a/src/gui_qt/math/evaluation.py b/src/gui_qt/math/evaluation.py index c74bf14..f27a16f 100644 --- a/src/gui_qt/math/evaluation.py +++ b/src/gui_qt/math/evaluation.py @@ -37,13 +37,12 @@ class QEvalDialog(QtWidgets.QDialog, Ui_CalcDialog): tmp.append(self.listWidget.takeItem(0)) for set_id, name in data: - # search if set was used before new_one = True for i in range(len(tmp)): w = tmp[i] if w.data(QtCore.Qt.UserRole) == set_id: - + w.setText(name) self.listWidget.addItem(w) tmp.pop(i) new_one = False @@ -60,7 +59,7 @@ class QEvalDialog(QtWidgets.QDialog, Ui_CalcDialog): while len(tmp): # delete remaining ListWidgetItems w = tmp.pop() - w.deleteLater() + del w def set_graphs(self, graphs: list): self.graph_comboBox.clear()