Kaynağa Gözat

- another attempt to make TclCommand quit_flatcam work under Linux

Marius Stanciu 6 yıl önce
ebeveyn
işleme
d3f144dec4
2 değiştirilmiş dosya ile 8 ekleme ve 4 silme
  1. 7 4
      FlatCAMApp.py
  2. 1 0
      README.md

+ 7 - 4
FlatCAMApp.py

@@ -5104,7 +5104,7 @@ class App(QtCore.QObject):
 
         :return: None
         """
-        self.save_defaults()
+        self.save_defaults(silent=True)
         log.debug("App.final_save() --> App Defaults saved.")
 
         if self.cmd_line_headless != 1:
@@ -5139,10 +5139,13 @@ class App(QtCore.QObject):
 
         log.debug("App.final_save() --> App UI state saved.")
 
-        QtWidgets.qApp.quit()
-
+        # QtWidgets.qApp.quit()
+        QtCore.QCoreApplication.exit()
         if sys.platform != 'win32':
-            sys.exit()
+            try:
+                sys.exit()
+            except Exception:
+                pass
 
     def on_portable_checked(self, state):
         """

+ 1 - 0
README.md

@@ -20,6 +20,7 @@ CAD program, and create G-Code for Isolation routing.
 - in Transform Tool mae sure that the buffer sub-tool parameters are better explained in tooltips
 - attempt to make TclCommand quit_flatcam work under Linux
 - some fixes in the NCC Tcl command (using the bool() method on some params)
+- another attempt to make TclCommand quit_flatcam work under Linux
 
 29.12.2019