- Tools Database - added a context menu action to Save the changes to the database even if it's not in the Administration mode

This commit is contained in:
Marius Stanciu 2020-06-15 07:17:15 +03:00 committed by Marius
parent 5757d856d5
commit ed9fd94624
2 changed files with 13 additions and 0 deletions

View File

@ -14,6 +14,7 @@ CHANGELOG for FlatCAM beta
- Paint Tool - made the rest machining function for the paint single polygon method
- Paint Tool - refurbished the 'rest machining' for the entire tool
- Isolation Tool - fixed to work with selection of tools in the Tool Table (previously it always used all the tools in the Tool Table)
- Tools Database - added a context menu action to Save the changes to the database even if it's not in the Administration mode
14.06.2020

View File

@ -2007,9 +2007,21 @@ class ToolsDB2(QtWidgets.QWidget):
delete_tool = menu.addAction(QtGui.QIcon(self.app.resource_location + '/delete32.png'), _("Delete from DB"))
delete_tool.triggered.connect(self.on_tool_delete)
sep = menu.addSeparator()
save_changes = menu.addAction(QtGui.QIcon(self.app.resource_location + '/save_as.png'), _("Save changes"))
save_changes.triggered.connect(self.on_save_changes)
# tree_item = self.tree_widget.itemAt(pos)
menu.exec(self.tree_widget.viewport().mapToGlobal(pos))
def on_save_changes(self):
widget_name = self.app.ui.plot_tab_area.currentWidget().objectName()
if widget_name == 'database_tab':
# Tools DB saved, update flag
self.app.tools_db_changed_flag = False
self.app.tools_db_tab.on_save_tools_db()
def on_item_double_clicked(self, item, column):
if column == 0 and self.ok_to_add is True:
self.ok_to_add = False