Преглед изворни кода

- fixed an issue where the Geometry plot function protested that it does not have an parameter that is used by the CNCJob plot function. But both inherit from FaltCAMObj plot function which does not have that parameter so something may need to be changed. Until then I provided a phony keyboard parameter to make that function 'shut up'

Marius Stanciu пре 6 година
родитељ
комит
a7e6914584
3 измењених фајлова са 11 додато и 5 уклоњено
  1. 1 2
      FlatCAMApp.py
  2. 6 3
      FlatCAMObj.py
  3. 4 0
      README.md

+ 1 - 2
FlatCAMApp.py

@@ -7196,8 +7196,7 @@ class App(QtCore.QObject):
         try:
             d = json.load(f, object_hook=dict2obj)
         except:
-            App.log.error("Failed to parse project file: %s" % filename)
-            self.inform.emit(_("[ERROR_NOTCL] Failed to parse project file: %s") % filename)
+            App.log.error("Failed to parse project file, trying to see if it loads as an LZMA archive: %s" % filename)
             f.close()
 
             # Open and parse a compressed Project file

+ 6 - 3
FlatCAMObj.py

@@ -4958,11 +4958,14 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
         except TypeError:  # Element is not iterable...
             self.add_shape(shape=element, color=color, visible=visible, layer=0)
 
-    def plot(self, visible=None):
+    def plot(self, visible=None, kind=None):
         """
-        Adds the object into collection.
+        Plot the object.
 
-        :return: None
+        :param visible: Controls if the added shape is visible of not
+        :param kind: added so there is no error when a project is loaded and it has both geometry and CNCJob, because
+        CNCJob require the 'kind' parameter. Perhaps the FlatCAMObj.plot() has to be rewrited
+        :return:
         """
 
         # Does all the required setup and returns False

+ 4 - 0
README.md

@@ -9,6 +9,10 @@ CAD program, and create G-Code for Isolation routing.
 
 =================================================
 
+26.03.2019
+
+- fixed an issue where the Geometry plot function protested that it does not have an parameter that is used by the CNCJob plot function. But both inherit from FaltCAMObj plot function which does not have that parameter so something may need to be changed. Until then I provided a phony keyboard parameter to make that function 'shut up'
+
 25.03.2019
 
 - in the TCL completer if the word is already complete don't add it again but add a space