- fixed issue with not loading old projects that do not have certain information's required by the new versions of FlatCAM

- compacted a bit more the GUI for Gerber Object
This commit is contained in:
Marius Stanciu
2019-02-19 13:00:38 +02:00
committed by Marius
parent 7f65cf628d
commit d998b87601
4 changed files with 22 additions and 12 deletions

View File

@@ -106,7 +106,12 @@ class FlatCAMObj(QtCore.QObject):
if attr == 'options':
self.options.update(d[attr])
else:
setattr(self, attr, d[attr])
try:
setattr(self, attr, d[attr])
except KeyError:
log.debug("FlatCAMObj.from_dict() --> KeyError: %s. Means that we are loading an old project that don't"
"have all attributes in the latest FlatCAM." % str(attr))
pass
def on_options_change(self, key):
# Update form on programmatically options change