- 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:
Marius Stanciu
2019-04-12 22:55:20 +03:00
parent 57e8db1f9b
commit a1f7c86996
12 changed files with 6053 additions and 4740 deletions

View File

@@ -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