From a4b90cd97ce9d5166dc705f1c4e61b16d93b6bc3 Mon Sep 17 00:00:00 2001 From: Christoph Wiedemann <62332054+cwiede@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:39:00 +0200 Subject: [PATCH] fix variable editors always filled with empty values instead of the previous values --- nexxT/services/gui/PropertyDelegate.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nexxT/services/gui/PropertyDelegate.py b/nexxT/services/gui/PropertyDelegate.py index 9a6865b..0abe1e6 100644 --- a/nexxT/services/gui/PropertyDelegate.py +++ b/nexxT/services/gui/PropertyDelegate.py @@ -71,6 +71,10 @@ def setEditorData(self, editor, index): else: editor.setText(d.property.getProperty(d.name, subst=False)) return None + if isinstance(editor, QLineEdit): + # this is happening for variables ... + editor.setText(self.model.data(index, Qt.DisplayRole)) + return None return super().setEditorData(editor, index) def setModelData(self, editor, model, index):