Browse Source

- made sure that the Tools Tab is cleared on Editors exit

Marius Stanciu 6 years ago
parent
commit
7294c88ef9
2 changed files with 11 additions and 0 deletions
  1. 10 0
      FlatCAMApp.py
  2. 1 0
      README.md

+ 10 - 0
FlatCAMApp.py

@@ -2218,6 +2218,11 @@ class App(QtCore.QObject):
                 response = msgbox.clickedButton()
 
                 if response == bt_yes:
+                    # clean the Tools Tab
+                    self.ui.tool_scroll_area.takeWidget()
+                    self.ui.tool_scroll_area.setWidget(QtWidgets.QWidget())
+                    self.ui.notebook.setTabText(2, "Tool")
+
                     if isinstance(edited_obj, FlatCAMGeometry):
                         obj_type = "Geometry"
                         if cleanup is None:
@@ -2272,6 +2277,11 @@ class App(QtCore.QObject):
 
                     self.inform.emit(_("[selected] %s is updated, returning to App...") % obj_type)
                 elif response == bt_no:
+                    # clean the Tools Tab
+                    self.ui.tool_scroll_area.takeWidget()
+                    self.ui.tool_scroll_area.setWidget(QtWidgets.QWidget())
+                    self.ui.notebook.setTabText(2, "Tool")
+
                     if isinstance(edited_obj, FlatCAMGeometry):
                         self.geo_editor.deactivate()
                     elif isinstance(edited_obj, FlatCAMGerber):

+ 1 - 0
README.md

@@ -22,6 +22,7 @@ CAD program, and create G-Code for Isolation routing.
 - Excellon Editor:  made Add Pad tool to work until right click
 - Excellon Editor: fixed mouse right click was always doing popup context menu
 - GUIElements.FCEntry2(): added a try-except clause
+- made sure that the Tools Tab is cleared on Editors exit
 
 30.04.2019