From 613a60cecc2c54716a89b46fd31af361e2a9194c Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sun, 13 Mar 2022 04:28:52 +0200 Subject: [PATCH] - fixed issues when saving the project due of changed serializable attributes --- CHANGELOG.md | 4 ++++ appObjects/FlatCAMCNCJob.py | 2 +- appObjects/FlatCAMDocument.py | 2 +- appObjects/FlatCAMExcellon.py | 2 +- appObjects/FlatCAMGeometry.py | 2 +- appObjects/FlatCAMGerber.py | 2 +- appObjects/FlatCAMScript.py | 2 +- 7 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12c6f97f..dec6dc4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ CHANGELOG for FlatCAM beta ================================================= +13.03.2022 + +- fixed issues when saving the project due of changed serializable attributes + 12.03.2022 - added to the application an older contribution by another user: Columnar Layout for the Preferences Tab. It can be set in Preferences -> General -> GUI section diff --git a/appObjects/FlatCAMCNCJob.py b/appObjects/FlatCAMCNCJob.py index ed9694a4..a4512e54 100644 --- a/appObjects/FlatCAMCNCJob.py +++ b/appObjects/FlatCAMCNCJob.py @@ -195,7 +195,7 @@ class CNCJobObject(FlatCAMObj, CNCjob): # Always append to it because it carries contents # from predecessors. self.ser_attrs += [ - 'options', 'kind', 'tools', 'multitool', 'append_snippet', + 'obj_options', 'kind', 'tools', 'multitool', 'append_snippet', 'prepend_snippet', 'gc_header' ] diff --git a/appObjects/FlatCAMDocument.py b/appObjects/FlatCAMDocument.py index 418cbc25..48ded4db 100644 --- a/appObjects/FlatCAMDocument.py +++ b/appObjects/FlatCAMDocument.py @@ -37,7 +37,7 @@ class DocumentObject(FlatCAMObj): self.kind = "document" self.units = '' - self.ser_attrs = ['options', 'kind', 'source_file'] + self.ser_attrs = ['obj_options', 'kind', 'source_file'] self.source_file = '' self.doc_code = '' diff --git a/appObjects/FlatCAMExcellon.py b/appObjects/FlatCAMExcellon.py index 994cc73d..57e7f8f2 100644 --- a/appObjects/FlatCAMExcellon.py +++ b/appObjects/FlatCAMExcellon.py @@ -106,7 +106,7 @@ class ExcellonObject(FlatCAMObj, Excellon): # Attributes to be included in serialization # Always append to it because it carries contents # from predecessors. - self.ser_attrs = ['options', 'kind', 'fill_color', 'outline_color', 'alpha_level'] + self.ser_attrs + self.ser_attrs = ['obj_options', 'kind', 'fill_color', 'outline_color', 'alpha_level'] + self.ser_attrs def set_ui(self, ui): """ diff --git a/appObjects/FlatCAMGeometry.py b/appObjects/FlatCAMGeometry.py index f254e194..e9338e30 100644 --- a/appObjects/FlatCAMGeometry.py +++ b/appObjects/FlatCAMGeometry.py @@ -158,7 +158,7 @@ class GeometryObject(FlatCAMObj, Geometry): # Attributes to be included in serialization # Always append to it because it carries contents # from predecessors. - self.ser_attrs += ['options', 'kind', 'multigeo', 'fill_color', 'outline_color', 'alpha_level'] + self.ser_attrs += ['obj_options', 'kind', 'multigeo', 'fill_color', 'outline_color', 'alpha_level'] def build_ui(self): try: diff --git a/appObjects/FlatCAMGerber.py b/appObjects/FlatCAMGerber.py index e21662a1..856c0794 100644 --- a/appObjects/FlatCAMGerber.py +++ b/appObjects/FlatCAMGerber.py @@ -106,7 +106,7 @@ class GerberObject(FlatCAMObj, Gerber): # Attributes to be included in serialization # Always append to it because it carries contents # from predecessors. - self.ser_attrs = ['options', 'kind', 'fill_color', 'outline_color', 'alpha_level'] + self.ser_attrs + self.ser_attrs = ['obj_options', 'kind', 'fill_color', 'outline_color', 'alpha_level'] + self.ser_attrs def set_ui(self, ui): """ diff --git a/appObjects/FlatCAMScript.py b/appObjects/FlatCAMScript.py index 034c4beb..9173e7ae 100644 --- a/appObjects/FlatCAMScript.py +++ b/appObjects/FlatCAMScript.py @@ -48,7 +48,7 @@ class ScriptObject(FlatCAMObj): self.script_editor_tab = None - self.ser_attrs = ['options', 'kind', 'source_file'] + self.ser_attrs = ['obj_options', 'kind', 'source_file'] self.source_file = '' self.script_code = '' self.script_filename = ''