Fix for crashes when only tool deleted and save-as on exit

Issue #628 new
Anton VV created an issue

As there is no permission to create a pull-reaquest somehow, just posting the -diff fix

diff --git a/appObjects/FlatCAMGeometry.py b/appObjects/FlatCAMGeometry.py
index 4cca8075..6a1aac4c 100644
--- a/appObjects/FlatCAMGeometry.py
+++ b/appObjects/FlatCAMGeometry.py
@@ -575,7 +575,7 @@ class GeometryObject(FlatCAMObj, Geometry):
             _("Copy"), self.on_tool_copy,
             icon=QtGui.QIcon(self.app.resource_location + "/copy16.png"))
         self.ui.geo_tools_table.addContextMenu(
-            _("Delete"), lambda: self.on_tool_delete(all_tools=None),
+            _("Delete"), lambda: self.on_tool_delete(None, all_tools=None),
             icon=QtGui.QIcon(self.app.resource_location + "/trash16.png"))

         # Show/Hide Advanced Options
diff --git a/app_Main.py b/app_Main.py
index 6e918910..14858629 100644
--- a/app_Main.py
+++ b/app_Main.py
@@ -3535,7 +3535,8 @@ class App(QtCore.QObject):
                     self.trayIcon.hide()
                 except Exception:
                     pass
-                self.on_file_saveprojectas(use_thread=True, quit_action=True)
+                self.f_handlers.on_file_saveprojectas(use_thread=True, quit_action=True)
+                #self.on_file_saveprojectas(use_thread=True, quit_action=True)
             elif response == bt_no:
                 try:
                     self.trayIcon.hide()

Comments (3)

  1. Anton VV reporter

    Hi! I believe you have just fixed the “only tool deleted” issue, and probably “save on exit” is not relevant to your development branch. Thank you for noticing an updated branch and that’s cool you continue to improve FlatCAM !

  2. Log in to comment