- made optional the saving of an edited object. Now the user can cancel the changes to the object.
- replaced the standard buttons in the QMessageBox's used in the app with custom ones that can have text translated - updated the POT translation file and the MO/PO files for English and Romanian language
This commit is contained in:
@@ -1604,6 +1604,10 @@ class FlatCAMExcEditor(QtCore.QObject):
|
||||
if self.app.ui.grid_snap_btn.isChecked() is False:
|
||||
self.app.ui.grid_snap_btn.trigger()
|
||||
|
||||
# adjust the visibility of some of the canvas context menu
|
||||
self.app.ui.popmenu_edit.setVisible(False)
|
||||
self.app.ui.popmenu_save.setVisible(True)
|
||||
|
||||
# Tell the App that the editor is active
|
||||
self.editor_active = True
|
||||
|
||||
@@ -1657,6 +1661,10 @@ class FlatCAMExcEditor(QtCore.QObject):
|
||||
self.app.ui.g_editor_cmenu.setEnabled(False)
|
||||
self.app.ui.e_editor_cmenu.setEnabled(False)
|
||||
|
||||
# adjust the visibility of some of the canvas context menu
|
||||
self.app.ui.popmenu_edit.setVisible(True)
|
||||
self.app.ui.popmenu_save.setVisible(False)
|
||||
|
||||
# Show original geometry
|
||||
if self.exc_obj:
|
||||
self.exc_obj.visible = True
|
||||
|
||||
@@ -2864,6 +2864,10 @@ class FlatCAMGeoEditor(QtCore.QObject):
|
||||
for w in sel_tab_widget_list:
|
||||
w.setEnabled(False)
|
||||
|
||||
# adjust the visibility of some of the canvas context menu
|
||||
self.app.ui.popmenu_edit.setVisible(False)
|
||||
self.app.ui.popmenu_save.setVisible(True)
|
||||
|
||||
# Tell the App that the editor is active
|
||||
self.editor_active = True
|
||||
|
||||
@@ -2915,6 +2919,18 @@ class FlatCAMGeoEditor(QtCore.QObject):
|
||||
# Tell the app that the editor is no longer active
|
||||
self.editor_active = False
|
||||
|
||||
# adjust the visibility of some of the canvas context menu
|
||||
self.app.ui.popmenu_edit.setVisible(True)
|
||||
self.app.ui.popmenu_save.setVisible(False)
|
||||
|
||||
try:
|
||||
# re-enable all the widgets in the Selected Tab that were disabled after entering in Edit Geometry Mode
|
||||
sel_tab_widget_list = self.app.ui.selected_tab.findChildren(QtWidgets.QWidget)
|
||||
for w in sel_tab_widget_list:
|
||||
w.setEnabled(True)
|
||||
except Exception as e:
|
||||
log.debug("FlatCAMGeoEditor.deactivate() --> %s" % str(e))
|
||||
|
||||
# Show original geometry
|
||||
if self.fcgeometry:
|
||||
self.fcgeometry.visible = True
|
||||
@@ -3637,11 +3653,6 @@ class FlatCAMGeoEditor(QtCore.QObject):
|
||||
for shape in self.storage.get_objects():
|
||||
fcgeometry.solid_geometry.append(shape.geo)
|
||||
|
||||
# re-enable all the widgets in the Selected Tab that were disabled after entering in Edit Geometry Mode
|
||||
sel_tab_widget_list = self.app.ui.selected_tab.findChildren(QtWidgets.QWidget)
|
||||
for w in sel_tab_widget_list:
|
||||
w.setEnabled(True)
|
||||
|
||||
def update_options(self, obj):
|
||||
if self.paint_tooldia:
|
||||
obj.options['cnctooldia'] = self.paint_tooldia
|
||||
|
||||
@@ -1767,6 +1767,10 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
||||
if self.app.ui.grid_snap_btn.isChecked() is False:
|
||||
self.app.ui.grid_snap_btn.trigger()
|
||||
|
||||
# adjust the visibility of some of the canvas context menu
|
||||
self.app.ui.popmenu_edit.setVisible(False)
|
||||
self.app.ui.popmenu_save.setVisible(True)
|
||||
|
||||
# Tell the App that the editor is active
|
||||
self.editor_active = True
|
||||
|
||||
@@ -1821,6 +1825,10 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
||||
self.app.ui.grb_editor_cmenu.setEnabled(False)
|
||||
self.app.ui.e_editor_cmenu.setEnabled(False)
|
||||
|
||||
# adjust the visibility of some of the canvas context menu
|
||||
self.app.ui.popmenu_edit.setVisible(True)
|
||||
self.app.ui.popmenu_save.setVisible(False)
|
||||
|
||||
# Show original geometry
|
||||
if self.gerber_obj:
|
||||
self.gerber_obj.visible = True
|
||||
|
||||
Reference in New Issue
Block a user