Browse Source

- fixed some bugs that are visible in Linux regarding the ArgsThread class: on app close we need to quit the QThread running the ArgsThread class and also close the opened Socket

Marius Stanciu 6 năm trước cách đây
mục cha
commit
24260b29b4
2 tập tin đã thay đổi với 12 bổ sung0 xóa
  1. 8 0
      FlatCAMApp.py
  2. 4 0
      README.md

+ 8 - 0
FlatCAMApp.py

@@ -2681,6 +2681,9 @@ class App(QtCore.QObject):
             from flatcamGUI.PlotCanvasLegacy import ShapeCollectionLegacy
             from flatcamGUI.PlotCanvasLegacy import ShapeCollectionLegacy
             self.tool_shapes = ShapeCollectionLegacy(obj=self, app=self, name="tool")
             self.tool_shapes = ShapeCollectionLegacy(obj=self, app=self, name="tool")
 
 
+        # used in the delayed shutdown self.start_delayed_quit() method
+        self.save_timer = None
+
         # ###############################################################################
         # ###############################################################################
         # ################# ADDING FlatCAM EDITORS section ##############################
         # ################# ADDING FlatCAM EDITORS section ##############################
         # ###############################################################################
         # ###############################################################################
@@ -5200,6 +5203,7 @@ class App(QtCore.QObject):
             del stgs
             del stgs
 
 
         log.debug("App.final_save() --> App UI state saved.")
         log.debug("App.final_save() --> App UI state saved.")
+        self.th.quit()
         self.close_app_signal.emit()
         self.close_app_signal.emit()
 
 
     def kill_app(self):
     def kill_app(self):
@@ -12654,6 +12658,10 @@ class ArgsThread(QtCore.QObject):
             conn.send('close')
             conn.send('close')
             # close the current instance only if there are args
             # close the current instance only if there are args
             if len(sys.argv) > 1:
             if len(sys.argv) > 1:
+                try:
+                    listener.close()
+                except Exception:
+                    pass
                 sys.exit()
                 sys.exit()
 
 
     def serve(self, conn):
     def serve(self, conn):

+ 4 - 0
README.md

@@ -9,6 +9,10 @@ CAD program, and create G-Code for Isolation routing.
 
 
 =================================================
 =================================================
 
 
+19.01.2020
+
+- fixed some bugs that are visible in Linux regarding the ArgsThread class: on app close we need to quit the QThread running the ArgsThread class and also close the opened Socket
+
 15.01.2020
 15.01.2020
 
 
 - added key shortcuts and toolbar icons for the new tools: Align Object Tool (ALT+A) and Extract Drills (ALT+I)
 - added key shortcuts and toolbar icons for the new tools: Align Object Tool (ALT+A) and Extract Drills (ALT+I)