mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
AdisTS: Fix the possibility to edit AdisTS windows on a parent scenario
This commit is contained in:
1 parent
eed2ce4243
commit
a78be47e2b
11 files changed
+115
-37
No files matched your search
@@ -103,6 +103,11 @@ class EditLateralContributionAdisTSWindow(PamhyrWindow):
|
||||
parent=self
|
||||
)
|
||||
|
||||
if self._study.is_editable():
|
||||
editable_headers = self._trad.get_dict("table_headers")
|
||||
else:
|
||||
editable_headers = []
|
||||
|
||||
headers = {}
|
||||
table_headers = self._trad.get_dict("table_headers")
|
||||
for h in self._data.header:
|
||||
@@ -112,7 +117,7 @@ class EditLateralContributionAdisTSWindow(PamhyrWindow):
|
||||
self._table = TableModel(
|
||||
table_view=table,
|
||||
table_headers=headers,
|
||||
editable_headers=self._data.header,
|
||||
editable_headers=editable_headers,
|
||||
delegates={
|
||||
# "time": self._delegate_time,
|
||||
},
|
||||
@@ -147,8 +152,9 @@ class EditLateralContributionAdisTSWindow(PamhyrWindow):
|
||||
self.plot.draw()
|
||||
|
||||
def setup_connections(self):
|
||||
self.find(QAction, "action_add").triggered.connect(self.add)
|
||||
self.find(QAction, "action_del").triggered.connect(self.delete)
|
||||
if self._study.is_editable():
|
||||
self.find(QAction, "action_add").triggered.connect(self.add)
|
||||
self.find(QAction, "action_del").triggered.connect(self.delete)
|
||||
|
||||
self._table.dataChanged.connect(self.update)
|
||||
|
||||
|
||||
Reference in new issue
Block a user