Juan Pablo Caram 10 سال پیش
والد
کامیت
5e45699c35
2فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 5 0
      FlatCAMApp.py
  2. 2 1
      FlatCAMDraw.py

+ 5 - 0
FlatCAMApp.py

@@ -2186,6 +2186,11 @@ class App(QtCore.QObject):
             return 'Ok'
 
         def write_gcode(obj_name, filename, preamble='', postamble=''):
+            """
+            Requires obj_name to be available. It might still be in the
+            making at the time this function is called, so check for
+            promises and send to background if there are promises.
+            """
             if self.collection.has_promises():
                 self.log.debug("Collection has promises. write_gcode() queued.")
                 self.worker_task.emit({

+ 2 - 1
FlatCAMDraw.py

@@ -827,7 +827,8 @@ class FlatCAMDraw(QtCore.QObject):
         """
         assert isinstance(fcgeometry, Geometry)
 
-        self.clear()
+        self.deactivate()
+
         self.connect_canvas_event_handlers()
         self.select_tool("select")