- 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:
@@ -14,6 +14,7 @@ CHANGELOG for FlatCAM beta
|
|||||||
- Paint Tool - made the rest machining function for the paint single polygon method
|
- Paint Tool - made the rest machining function for the paint single polygon method
|
||||||
- Paint Tool - refurbished the 'rest machining' for the entire tool
|
- 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)
|
- 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
|
14.06.2020
|
||||||
|
|
||||||
|
|||||||
@@ -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 = menu.addAction(QtGui.QIcon(self.app.resource_location + '/delete32.png'), _("Delete from DB"))
|
||||||
delete_tool.triggered.connect(self.on_tool_delete)
|
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)
|
# tree_item = self.tree_widget.itemAt(pos)
|
||||||
menu.exec(self.tree_widget.viewport().mapToGlobal(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):
|
def on_item_double_clicked(self, item, column):
|
||||||
if column == 0 and self.ok_to_add is True:
|
if column == 0 and self.ok_to_add is True:
|
||||||
self.ok_to_add = False
|
self.ok_to_add = False
|
||||||
|
|||||||
Reference in New Issue
Block a user