- added a protection on opening the tools database UI if the tools DB file is not loaded

This commit is contained in:
Marius Stanciu
2020-10-29 12:53:19 +02:00
committed by Marius
parent 3f94c1dcfa
commit 443f9a51e8
7 changed files with 31 additions and 5 deletions

View File

@@ -1100,7 +1100,9 @@ class GeometryObject(FlatCAMObj, Geometry):
if self.app.ui.plot_tab_area.tabText(idx) == _("Tools Database"):
self.app.ui.plot_tab_area.setCurrentWidget(self.app.tools_db_tab)
break
self.app.on_tools_database()
ret_val = self.app.on_tools_database()
if ret_val == 'fail':
return
self.app.tools_db_tab.ok_to_add = True
self.app.tools_db_tab.ui.buttons_frame.hide()
self.app.tools_db_tab.ui.add_tool_from_db.show()