From eba7869c4d2d667cf955d2234c34ae9d2241c69f Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Wed, 19 Apr 2023 19:43:04 +0200 Subject: [PATCH] data list in QEvalDialog uses current names instead of stored --- src/gui_qt/math/evaluation.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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()