diff --git a/FlatCAMApp.py b/FlatCAMApp.py index ca106bc2..557d5f9d 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -6272,7 +6272,6 @@ class App(QtCore.QObject): obj_inst.from_dict(obj) App.log.debug(obj['kind'] + ": " + obj['options']['name']) self.new_object(obj['kind'], obj['options']['name'], obj_init, active=False, fit=False, plot=True) - self.plot_all() self.inform.emit("[success] Project loaded from: " + filename) diff --git a/FlatCAMObj.py b/FlatCAMObj.py index fa80da0f..6cd57213 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -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 diff --git a/ObjectUI.py b/ObjectUI.py index 03e3124c..6a6cf45a 100644 --- a/ObjectUI.py +++ b/ObjectUI.py @@ -390,16 +390,19 @@ class GerberObjectUI(ObjectUI): # Rounded corners self.noncopper_rounded_cb = FCCheckBox(label="Rounded corners") self.noncopper_rounded_cb.setToolTip( - "Creates a Geometry objects with polygons\n" - "covering the copper-free areas of the PCB." + "Resulting geometry will have rounded corners." ) - grid4.addWidget(self.noncopper_rounded_cb, 1, 0, 1, 2) + grid4.addWidget(self.noncopper_rounded_cb, 1, 0) - self.generate_noncopper_button = QtWidgets.QPushButton('Generate Geometry') - self.custom_box.addWidget(self.generate_noncopper_button) + self.generate_noncopper_button = QtWidgets.QPushButton('Generate Geo') + grid4.addWidget(self.generate_noncopper_button, 1, 1) ## Bounding box self.boundingbox_label = QtWidgets.QLabel('Bounding Box:') + self.boundingbox_label.setToolTip( + "Create a geometry surrounding the Gerber object.\n" + "Square shape." + ) self.custom_box.addWidget(self.boundingbox_label) grid5 = QtWidgets.QGridLayout() @@ -421,13 +424,13 @@ class GerberObjectUI(ObjectUI): "their radius is equal to\n" "the margin." ) - grid5.addWidget(self.bbrounded_cb, 1, 0, 1, 2) + grid5.addWidget(self.bbrounded_cb, 1, 0) - self.generate_bb_button = QtWidgets.QPushButton('Generate Geometry') + self.generate_bb_button = QtWidgets.QPushButton('Generate Geo') self.generate_bb_button.setToolTip( - "Genrate the Geometry object." + "Generate the Geometry object." ) - self.custom_box.addWidget(self.generate_bb_button) + grid5.addWidget(self.generate_bb_button, 1, 1) class ExcellonObjectUI(ObjectUI): diff --git a/README.md b/README.md index e770f9e9..59a059e3 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,10 @@ CAD program, and create G-Code for Isolation routing. 19.02.2019 - added the ability to compress the FlatCAM project on save with LZMA compression. There is a setting in Edit -> Preferences -> Compression Level between 0 and 9. 9 level yields best compression at the price of RAM usage and time spent. -- made FlatCAM able to load old type (uncompressed) FlatCAM projects +- made FlatCAM able to load old type (uncompressed) FlatCAM projects +- 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 + 18.02.2019