moved extracting the attributes into PlotDescription

This commit is contained in:
2023-01-26 15:58:32 +01:00
parent ca282e19d4
commit bdb8d94108
2 changed files with 5 additions and 1 deletions

View File

@ -136,7 +136,7 @@ class MainWindow(QMainWindow):
data = {}
for name, item in self.lst.items.items():
desc = item.value
data[name] = {k: v for k, v in desc.__dict__.items() if not k.startswith("_") and k != "name" and v is not None}
data[name] = desc.to_dict()
write_dict(fn, data)

View File

@ -36,4 +36,8 @@ class PlotDescription:
return res
def to_dict(self):
return {k: v for k, v in self.__dict__.items() if not k.startswith("_") and k != "name" and v is not None}