Ver Fonte

- restored the FlatCAMObj.visible() to a non-threaded default

Marius Stanciu há 6 anos atrás
pai
commit
0244c76605
4 ficheiros alterados com 18 adições e 6 exclusões
  1. 4 1
      FlatCAMApp.py
  2. 6 2
      FlatCAMObj.py
  3. 1 0
      README.md
  4. 7 3
      camlib.py

+ 4 - 1
FlatCAMApp.py

@@ -8252,7 +8252,10 @@ The normal flow when working in FlatCAM is the following:</span></p>
         """
         FlatCAMObj.app = self
         ObjectCollection.app = self
-
+        Gerber.app = self
+        Excellon.app = self
+        Geometry.app = self
+        CNCjob.app = self
         FCProcess.app = self
         FCProcessContainer.app = self
 

+ 6 - 2
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):

+ 1 - 0
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
 

+ 7 - 3
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