From 0244c76605ce2d50ece9170f7d344cdae945718b Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sun, 16 Jun 2019 02:34:41 +0300 Subject: [PATCH] - restored the FlatCAMObj.visible() to a non-threaded default --- FlatCAMApp.py | 5 ++++- FlatCAMObj.py | 8 ++++++-- README.md | 1 + camlib.py | 10 +++++++--- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 07d37350..f85ef465 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -8252,7 +8252,10 @@ The normal flow when working in FlatCAM is the following:

""" FlatCAMObj.app = self ObjectCollection.app = self - + Gerber.app = self + Excellon.app = self + Geometry.app = self + CNCjob.app = self FCProcess.app = self FCProcessContainer.app = self diff --git a/FlatCAMObj.py b/FlatCAMObj.py index 4b3a278e..3f0ebf9f 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -199,6 +199,7 @@ class FlatCAMObj(QtCore.QObject): log.debug("on_name_activate() --> Could not remove the old object name from auto-completer model list") self.options["name"] = self.ui.name_entry.get_value() + self.app.collection.update_view() self.app.inform.emit(_("[success] Name changed from {old} to {new}").format(old=old_name, new=new_name)) def on_offset_button_click(self): @@ -338,7 +339,7 @@ class FlatCAMObj(QtCore.QObject): return self.shapes.visible @visible.setter - def visible(self, value): + def visible(self, value, threaded=False): log.debug("FlatCAMObj.visible()") def worker_task(app_obj): @@ -350,7 +351,10 @@ class FlatCAMObj(QtCore.QObject): except Exception as e: pass - self.app.worker_task.emit({'fcn': worker_task, 'params': [self]}) + if threaded is False: + worker_task(self) + else: + self.app.worker_task.emit({'fcn': worker_task, 'params': [self]}) @property def drawing_tolerance(self): diff --git a/README.md b/README.md index 3f980808..4576fc2f 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing. - fixed bug in Gerber parser that made the Gerber files generated by Altium Designer 18 not to be loaded - fixed bug in Gerber editor - on multiple edits on the same object, the aperture size and dims were continuously multiplied due of the file units not being updated +- restored the FlatCAMObj.visible() to a non-threaded default 11.06.2019 diff --git a/camlib.py b/camlib.py index 957aee0e..698f2da8 100644 --- a/camlib.py +++ b/camlib.py @@ -112,9 +112,9 @@ class Geometry(object): self.geo_steps_per_circle = geo_steps_per_circle - if geo_steps_per_circle is None: - geo_steps_per_circle = int(Geometry.defaults["geo_steps_per_circle"]) - self.geo_steps_per_circle = geo_steps_per_circle + # if geo_steps_per_circle is None: + # geo_steps_per_circle = int(Geometry.defaults["geo_steps_per_circle"]) + # self.geo_steps_per_circle = geo_steps_per_circle def make_index(self): self.flatten() @@ -1849,6 +1849,8 @@ class ApertureMacro: class Gerber (Geometry): """ + Here it is done all the Gerber parsing. + **ATTRIBUTES** * ``apertures`` (dict): The keys are names/identifiers of each aperture. @@ -3597,6 +3599,8 @@ class Gerber (Geometry): class Excellon(Geometry): """ + Here it is done all the Excellon parsing. + *ATTRIBUTES* * ``tools`` (dict): The key is the tool name and the value is