Просмотр исходного кода

Merged marius_stanciu/flatcam_beta/Beta_8.994 into Beta_unstable

Marius Stanciu 5 лет назад
Родитель
Сommit
22f8005a7d

+ 6 - 0
CHANGELOG.md

@@ -7,6 +7,11 @@ CHANGELOG for FlatCAM beta
 
 =================================================
 
+27.10.2020
+
+- created custom classes derived from TextEdit and from LineEdit where I overloaded the context menu and I made all the other classes that were inheriting from them to inherit from those new classes
+- minor fix in ToolsDB2UI
+
 26.10.2020
 
 - added a new menu entry and functionality in the View category: enable all non-selected (shortcut key ALT+3)
@@ -28,6 +33,7 @@ CHANGELOG for FlatCAM beta
 - another GUI element for which I've overloaded the context menu to make it translatable: _ExpandableTextEdit
 - overloaded the context menu for FCSpinner and for FCDoubleSpinner
 - added new strings and therefore updated the translation strings
+- fixed some minor issues when doing a project save
 
 25.10.2020
 

+ 4 - 5
appDatabase.py

@@ -177,20 +177,19 @@ class ToolsDB2UI:
         descript_vlay.addLayout(tools_vlay)
         descript_vlay.addStretch()
 
-        milling_vlay = QtWidgets.QVBoxLayout()
-        milling_vlay.addWidget(self.milling_box)
-        milling_vlay.addStretch()
+        mill_vlay = QtWidgets.QVBoxLayout()
+        mill_vlay.addWidget(self.milling_box)
+        mill_vlay.addStretch()
 
         drilling_vlay = QtWidgets.QVBoxLayout()
         drilling_vlay.addWidget(self.drill_box)
 
         param_hlay.addLayout(descript_vlay)
-        param_hlay.addLayout(milling_vlay)
         param_hlay.addLayout(drilling_vlay)
         param_hlay.addLayout(tools_vlay)
 
         # always visible, always to be included last
-        param_hlay.addLayout(milling_vlay)
+        param_hlay.addLayout(mill_vlay)
 
         param_hlay.addStretch()
 

+ 195 - 279
appGUI/GUIElements.py

@@ -276,7 +276,89 @@ class FCTree(QtWidgets.QTreeWidget):
             header.resizeSection(column, width)
 
 
-class LengthEntry(QtWidgets.QLineEdit):
+class FCLineEdit(QtWidgets.QLineEdit):
+
+    def __init__(self, *args, **kwargs):
+        super(FCLineEdit, self).__init__(*args, **kwargs)
+
+        self.menu = None
+
+    def contextMenuEvent(self, event):
+        self.menu = QtWidgets.QMenu()
+
+        # UNDO
+        undo_action = QAction('%s\t%s' % (_("Undo"), _('Ctrl+Z')), self)
+        self.menu.addAction(undo_action)
+        undo_action.triggered.connect(self.undo)
+        if self.isUndoAvailable() is False:
+            undo_action.setDisabled(True)
+
+        # REDO
+        redo_action = QAction('%s\t%s' % (_("Redo"), _('Ctrl+Y')), self)
+        self.menu.addAction(redo_action)
+        redo_action.triggered.connect(self.redo)
+        if self.isRedoAvailable() is False:
+            redo_action.setDisabled(True)
+
+        self.menu.addSeparator()
+
+        # CUT
+        cut_action = QAction('%s\t%s' % (_("Cut"), _('Ctrl+X')), self)
+        self.menu.addAction(cut_action)
+        cut_action.triggered.connect(self.cut_text)
+        if not self.hasSelectedText():
+            cut_action.setDisabled(True)
+
+        # COPY
+        copy_action = QAction('%s\t%s' % (_("Copy"), _('Ctrl+C')), self)
+        self.menu.addAction(copy_action)
+        copy_action.triggered.connect(self.copy_text)
+        if not self.hasSelectedText():
+            copy_action.setDisabled(True)
+
+        # PASTE
+        paste_action = QAction('%s\t%s' % (_("Paste"), _('Ctrl+V')), self)
+        self.menu.addAction(paste_action)
+        paste_action.triggered.connect(self.paste_text)
+
+        # DELETE
+        delete_action = QAction('%s\t%s' % (_("Delete"), _('Del')), self)
+        self.menu.addAction(delete_action)
+        delete_action.triggered.connect(self.del_)
+
+        self.menu.addSeparator()
+
+        # SELECT ALL
+        sel_all_action = QAction('%s\t%s' % (_("Select All"), _('Ctrl+A')), self)
+        self.menu.addAction(sel_all_action)
+        sel_all_action.triggered.connect(self.selectAll)
+
+        self.menu.exec_(event.globalPos())
+
+    def cut_text(self):
+        clipboard = QtWidgets.QApplication.clipboard()
+
+        txt = self.selectedText()
+        clipboard.clear()
+        clipboard.setText(txt)
+
+        self.del_()
+
+    def copy_text(self):
+        clipboard = QtWidgets.QApplication.clipboard()
+
+        txt = self.selectedText()
+        clipboard.clear()
+        clipboard.setText(txt)
+
+    def paste_text(self):
+        clipboard = QtWidgets.QApplication.clipboard()
+
+        txt = clipboard.text()
+        self.insert(txt)
+
+
+class LengthEntry(FCLineEdit):
     def __init__(self, output_units='IN', decimals=None, parent=None):
         super(LengthEntry, self).__init__(parent)
 
@@ -345,7 +427,7 @@ class LengthEntry(QtWidgets.QLineEdit):
         return QtCore.QSize(EDIT_SIZE_HINT, default_hint_size.height())
 
 
-class FloatEntry(QtWidgets.QLineEdit):
+class FloatEntry(FCLineEdit):
     def __init__(self, decimals=None, parent=None):
         super(FloatEntry, self).__init__(parent)
         self.readyToEdit = True
@@ -398,7 +480,7 @@ class FloatEntry(QtWidgets.QLineEdit):
         return QtCore.QSize(EDIT_SIZE_HINT, default_hint_size.height())
 
 
-class FloatEntry2(QtWidgets.QLineEdit):
+class FloatEntry2(FCLineEdit):
     def __init__(self, decimals=None, parent=None):
         super(FloatEntry2, self).__init__(parent)
         self.readyToEdit = True
@@ -441,7 +523,7 @@ class FloatEntry2(QtWidgets.QLineEdit):
         return QtCore.QSize(EDIT_SIZE_HINT, default_hint_size.height())
 
 
-class IntEntry(QtWidgets.QLineEdit):
+class IntEntry(FCLineEdit):
 
     def __init__(self, parent=None, allow_empty=False, empty_val=None):
         super(IntEntry, self).__init__(parent)
@@ -490,7 +572,7 @@ class IntEntry(QtWidgets.QLineEdit):
         return QtCore.QSize(EDIT_SIZE_HINT, default_hint_size.height())
 
 
-class FCEntry(QtWidgets.QLineEdit):
+class FCEntry(FCLineEdit):
     def __init__(self, decimals=None, alignment=None, border_color=None, parent=None):
         super(FCEntry, self).__init__(parent)
         self.readyToEdit = True
@@ -509,8 +591,6 @@ class FCEntry(QtWidgets.QLineEdit):
                 align_val = QtCore.Qt.AlignLeft
             self.setAlignment(align_val)
 
-        self.menu = None
-
     def on_edit_finished(self):
         self.clearFocus()
 
@@ -526,80 +606,6 @@ class FCEntry(QtWidgets.QLineEdit):
             self.deselect()
             self.readyToEdit = True
 
-    def contextMenuEvent(self, event):
-        self.menu = QtWidgets.QMenu()
-
-        # UNDO
-        undo_action = QAction('%s\t%s' % (_("Undo"), _('Ctrl+Z')), self)
-        self.menu.addAction(undo_action)
-        undo_action.triggered.connect(self.undo)
-        if self.isUndoAvailable() is False:
-            undo_action.setDisabled(True)
-
-        # REDO
-        redo_action = QAction('%s\t%s' % (_("Redo"), _('Ctrl+Y')), self)
-        self.menu.addAction(redo_action)
-        redo_action.triggered.connect(self.redo)
-        if self.isRedoAvailable() is False:
-            redo_action.setDisabled(True)
-
-        self.menu.addSeparator()
-
-        # CUT
-        cut_action = QAction('%s\t%s' % (_("Cut"), _('Ctrl+X')), self)
-        self.menu.addAction(cut_action)
-        cut_action.triggered.connect(self.cut_text)
-        if not self.hasSelectedText():
-            cut_action.setDisabled(True)
-
-        # COPY
-        copy_action = QAction('%s\t%s' % (_("Copy"), _('Ctrl+C')), self)
-        self.menu.addAction(copy_action)
-        copy_action.triggered.connect(self.copy_text)
-        if not self.hasSelectedText():
-            copy_action.setDisabled(True)
-
-        # PASTE
-        paste_action = QAction('%s\t%s' % (_("Paste"), _('Ctrl+V')), self)
-        self.menu.addAction(paste_action)
-        paste_action.triggered.connect(self.paste_text)
-
-        # DELETE
-        delete_action = QAction('%s\t%s' % (_("Delete"), _('Del')), self)
-        self.menu.addAction(delete_action)
-        delete_action.triggered.connect(self.del_)
-
-        self.menu.addSeparator()
-
-        # SELECT ALL
-        sel_all_action = QAction('%s\t%s' % (_("Select All"), _('Ctrl+A')), self)
-        self.menu.addAction(sel_all_action)
-        sel_all_action.triggered.connect(self.selectAll)
-
-        self.menu.exec_(event.globalPos())
-
-    def cut_text(self):
-        clipboard = QtWidgets.QApplication.clipboard()
-
-        txt = self.selectedText()
-        clipboard.clear()
-        clipboard.setText(txt)
-
-        self.del_()
-
-    def copy_text(self):
-        clipboard = QtWidgets.QApplication.clipboard()
-
-        txt = self.selectedText()
-        clipboard.clear()
-        clipboard.setText(txt)
-
-    def paste_text(self):
-        clipboard = QtWidgets.QApplication.clipboard()
-
-        txt = clipboard.text()
-        self.insert(txt)
-
     def get_value(self):
         return str(self.text())
 
@@ -650,7 +656,7 @@ class FCEntry3(FCEntry):
             return None
 
 
-class EvalEntry(QtWidgets.QLineEdit):
+class EvalEntry(FCLineEdit):
     def __init__(self, border_color=None, parent=None):
         super(EvalEntry, self).__init__(parent)
         self.readyToEdit = True
@@ -700,7 +706,7 @@ class EvalEntry(QtWidgets.QLineEdit):
         return QtCore.QSize(EDIT_SIZE_HINT, default_hint_size.height())
 
 
-class EvalEntry2(QtWidgets.QLineEdit):
+class EvalEntry2(FCLineEdit):
     def __init__(self, parent=None):
         super(EvalEntry2, self).__init__(parent)
         self.readyToEdit = True
@@ -1485,7 +1491,109 @@ class FCTextArea(QtWidgets.QPlainTextEdit):
             return QtCore.QSize(custom_sizehint, default_hint_size.height())
 
 
-class FCTextAreaRich(QtWidgets.QTextEdit):
+class FCTextEdit(QtWidgets.QTextEdit):
+
+    def __init__(self, *args, **kwargs):
+        super(FCTextEdit, self).__init__(*args, **kwargs)
+
+        self.menu = None
+        self.undo_flag = False
+        self.redo_flag = False
+
+        self.undoAvailable.connect(self.on_undo_available)
+        self.redoAvailable.connect(self.on_redo_available)
+
+    def on_undo_available(self, val):
+        self.undo_flag = val
+
+    def on_redo_available(self, val):
+        self.redo_flag = val
+
+    def contextMenuEvent(self, event):
+        self.menu = QtWidgets.QMenu()
+        tcursor = self.textCursor()
+        txt = tcursor.selectedText()
+
+        # UNDO
+        undo_action = QAction('%s\t%s' % (_("Undo"), _('Ctrl+Z')), self)
+        self.menu.addAction(undo_action)
+        undo_action.triggered.connect(self.undo)
+        if self.undo_flag is False:
+            undo_action.setDisabled(True)
+
+        # REDO
+        redo_action = QAction('%s\t%s' % (_("Redo"), _('Ctrl+Y')), self)
+        self.menu.addAction(redo_action)
+        redo_action.triggered.connect(self.redo)
+        if self.redo_flag is False:
+            redo_action.setDisabled(True)
+
+        self.menu.addSeparator()
+
+        # CUT
+        cut_action = QAction('%s\t%s' % (_("Cut"), _('Ctrl+X')), self)
+        self.menu.addAction(cut_action)
+        cut_action.triggered.connect(self.cut_text)
+        if txt == '':
+            cut_action.setDisabled(True)
+
+        # COPY
+        copy_action = QAction('%s\t%s' % (_("Copy"), _('Ctrl+C')), self)
+        self.menu.addAction(copy_action)
+        copy_action.triggered.connect(self.copy_text)
+        if txt == '':
+            copy_action.setDisabled(True)
+
+        # PASTE
+        paste_action = QAction('%s\t%s' % (_("Paste"), _('Ctrl+V')), self)
+        self.menu.addAction(paste_action)
+        paste_action.triggered.connect(self.paste_text)
+
+        # DELETE
+        delete_action = QAction('%s\t%s' % (_("Delete"), _('Del')), self)
+        self.menu.addAction(delete_action)
+        delete_action.triggered.connect(self.delete_text)
+
+        self.menu.addSeparator()
+
+        # SELECT ALL
+        sel_all_action = QAction('%s\t%s' % (_("Select All"), _('Ctrl+A')), self)
+        self.menu.addAction(sel_all_action)
+        sel_all_action.triggered.connect(self.selectAll)
+
+        self.menu.exec_(event.globalPos())
+
+    def cut_text(self):
+        tcursor = self.textCursor()
+        clipboard = QtWidgets.QApplication.clipboard()
+
+        txt = tcursor.selectedText()
+        clipboard.clear()
+        clipboard.setText(txt)
+
+        tcursor.deleteChar()
+
+    def copy_text(self):
+        tcursor = self.textCursor()
+        clipboard = QtWidgets.QApplication.clipboard()
+
+        txt = tcursor.selectedText()
+        clipboard.clear()
+        clipboard.setText(txt)
+
+    def paste_text(self):
+        tcursor = self.textCursor()
+        clipboard = QtWidgets.QApplication.clipboard()
+
+        txt = clipboard.text()
+        tcursor.insertText(txt)
+
+    def delete_text(self):
+        tcursor = self.textCursor()
+        tcursor.deleteChar()
+
+
+class FCTextAreaRich(FCTextEdit):
     def __init__(self, parent=None):
         super(FCTextAreaRich, self).__init__(parent)
 
@@ -1500,7 +1608,7 @@ class FCTextAreaRich(QtWidgets.QTextEdit):
         return QtCore.QSize(EDIT_SIZE_HINT, default_hint_size.height())
 
 
-class FCTextAreaExtended(QtWidgets.QTextEdit):
+class FCTextAreaExtended(FCTextEdit):
     def __init__(self, parent=None):
         super().__init__(parent)
 
@@ -1514,19 +1622,6 @@ class FCTextAreaExtended(QtWidgets.QTextEdit):
 
         self.completer_enable = False
 
-        self.menu = None
-        self.undo_flag = False
-        self.redo_flag = False
-
-        self.undoAvailable.connect(self.on_undo_available)
-        self.redoAvailable.connect(self.on_redo_available)
-
-    def on_undo_available(self, val):
-        self.undo_flag = val
-
-    def on_redo_available(self, val):
-        self.redo_flag = val
-
     def set_model_data(self, keyword_list):
         self.model.setStringList(keyword_list)
 
@@ -1654,89 +1749,6 @@ class FCTextAreaExtended(QtWidgets.QTextEdit):
             else:
                 self.completer.popup().hide()
 
-    def contextMenuEvent(self, event):
-        self.menu = QtWidgets.QMenu()
-        tcursor = self.textCursor()
-        txt = tcursor.selectedText()
-
-        # UNDO
-        undo_action = QAction('%s\t%s' % (_("Undo"), _('Ctrl+Z')), self)
-        self.menu.addAction(undo_action)
-        undo_action.triggered.connect(self.undo)
-        if self.undo_flag is False:
-            undo_action.setDisabled(True)
-
-        # REDO
-        redo_action = QAction('%s\t%s' % (_("Redo"), _('Ctrl+Y')), self)
-        self.menu.addAction(redo_action)
-        redo_action.triggered.connect(self.redo)
-        if self.redo_flag is False:
-            redo_action.setDisabled(True)
-
-        self.menu.addSeparator()
-
-        # CUT
-        cut_action = QAction('%s\t%s' % (_("Cut"), _('Ctrl+X')), self)
-        self.menu.addAction(cut_action)
-        cut_action.triggered.connect(self.cut_text)
-        if txt == '':
-            cut_action.setDisabled(True)
-
-        # COPY
-        copy_action = QAction('%s\t%s' % (_("Copy"), _('Ctrl+C')), self)
-        self.menu.addAction(copy_action)
-        copy_action.triggered.connect(self.copy_text)
-        if txt == '':
-            copy_action.setDisabled(True)
-
-        # PASTE
-        paste_action = QAction('%s\t%s' % (_("Paste"), _('Ctrl+V')), self)
-        self.menu.addAction(paste_action)
-        paste_action.triggered.connect(self.paste_text)
-
-        # DELETE
-        delete_action = QAction('%s\t%s' % (_("Delete"), _('Del')), self)
-        self.menu.addAction(delete_action)
-        delete_action.triggered.connect(self.delete_text)
-
-        self.menu.addSeparator()
-
-        # SELECT ALL
-        sel_all_action = QAction('%s\t%s' % (_("Select All"), _('Ctrl+A')), self)
-        self.menu.addAction(sel_all_action)
-        sel_all_action.triggered.connect(self.selectAll)
-
-        self.menu.exec_(event.globalPos())
-
-    def cut_text(self):
-        tcursor = self.textCursor()
-        clipboard = QtWidgets.QApplication.clipboard()
-
-        txt = tcursor.selectedText()
-        clipboard.clear()
-        clipboard.setText(txt)
-
-        tcursor.deleteChar()
-
-    def copy_text(self):
-        tcursor = self.textCursor()
-        clipboard = QtWidgets.QApplication.clipboard()
-
-        txt = tcursor.selectedText()
-        clipboard.clear()
-        clipboard.setText(txt)
-
-    def paste_text(self):
-        tcursor = self.textCursor()
-        clipboard = QtWidgets.QApplication.clipboard()
-
-        txt = clipboard.text()
-        tcursor.insertText(txt)
-
-    def delete_text(self):
-        tcursor = self.textCursor()
-        tcursor.deleteChar()
-
     def comment(self):
         """
         Got it from here:
@@ -3602,7 +3614,7 @@ class _BrowserTextEdit(QTextEdit):
         app.save_to_file(content_to_save=html_content, txt_content=txt_content)
 
 
-class _ExpandableTextEdit(QTextEdit):
+class _ExpandableTextEdit(FCTextEdit):
     """
     Class implements edit line, which expands themselves automatically
     """
@@ -3611,7 +3623,7 @@ class _ExpandableTextEdit(QTextEdit):
     historyPrev = QtCore.pyqtSignal()
 
     def __init__(self, termwidget, *args):
-        QTextEdit.__init__(self, *args)
+        FCTextEdit.__init__(self, *args)
         self.setStyleSheet("font: 9pt \"Courier\";")
         self._fittedHeight = 1
         self.textChanged.connect(self._fit_to_document)
@@ -3626,19 +3638,6 @@ class _ExpandableTextEdit(QTextEdit):
         self.completer.insertText.connect(self.insertCompletion)
         self.completer.popup().clicked.connect(self.insert_completion_click)
 
-        self.menu = None
-        self.undo_flag = False
-        self.redo_flag = False
-
-        self.undoAvailable.connect(self.on_undo_available)
-        self.redoAvailable.connect(self.on_redo_available)
-
-    def on_undo_available(self, val):
-        self.undo_flag = val
-
-    def on_redo_available(self, val):
-        self.redo_flag = val
-
     def set_model_data(self, keyword_list):
         self.model.setStringList(keyword_list)
 
@@ -3725,89 +3724,6 @@ class _ExpandableTextEdit(QTextEdit):
         else:
             self.completer.popup().hide()
 
-    def contextMenuEvent(self, event):
-        self.menu = QtWidgets.QMenu()
-        tcursor = self.textCursor()
-        txt = tcursor.selectedText()
-
-        # UNDO
-        undo_action = QAction('%s\t%s' % (_("Undo"), _('Ctrl+Z')), self)
-        self.menu.addAction(undo_action)
-        undo_action.triggered.connect(self.undo)
-        if self.undo_flag is False:
-            undo_action.setDisabled(True)
-
-        # REDO
-        redo_action = QAction('%s\t%s' % (_("Redo"), _('Ctrl+Y')), self)
-        self.menu.addAction(redo_action)
-        redo_action.triggered.connect(self.redo)
-        if self.redo_flag is False:
-            redo_action.setDisabled(True)
-
-        self.menu.addSeparator()
-
-        # CUT
-        cut_action = QAction('%s\t%s' % (_("Cut"), _('Ctrl+X')), self)
-        self.menu.addAction(cut_action)
-        cut_action.triggered.connect(self.cut_text)
-        if txt == '':
-            cut_action.setDisabled(True)
-
-        # COPY
-        copy_action = QAction('%s\t%s' % (_("Copy"), _('Ctrl+C')), self)
-        self.menu.addAction(copy_action)
-        copy_action.triggered.connect(self.copy_text)
-        if txt == '':
-            copy_action.setDisabled(True)
-
-        # PASTE
-        paste_action = QAction('%s\t%s' % (_("Paste"), _('Ctrl+V')), self)
-        self.menu.addAction(paste_action)
-        paste_action.triggered.connect(self.paste_text)
-
-        # DELETE
-        delete_action = QAction('%s\t%s' % (_("Delete"), _('Del')), self)
-        self.menu.addAction(delete_action)
-        delete_action.triggered.connect(self.delete_text)
-
-        self.menu.addSeparator()
-
-        # SELECT ALL
-        sel_all_action = QAction('%s\t%s' % (_("Select All"), _('Ctrl+A')), self)
-        self.menu.addAction(sel_all_action)
-        sel_all_action.triggered.connect(self.selectAll)
-
-        self.menu.exec_(event.globalPos())
-
-    def cut_text(self):
-        tcursor = self.textCursor()
-        clipboard = QtWidgets.QApplication.clipboard()
-
-        txt = tcursor.selectedText()
-        clipboard.clear()
-        clipboard.setText(txt)
-
-        tcursor.deleteChar()
-
-    def copy_text(self):
-        tcursor = self.textCursor()
-        clipboard = QtWidgets.QApplication.clipboard()
-
-        txt = tcursor.selectedText()
-        clipboard.clear()
-        clipboard.setText(txt)
-
-    def paste_text(self):
-        tcursor = self.textCursor()
-        clipboard = QtWidgets.QApplication.clipboard()
-
-        txt = clipboard.text()
-        tcursor.insertText(txt)
-
-    def delete_text(self):
-        tcursor = self.textCursor()
-        tcursor.deleteChar()
-
     def sizeHint(self):
         """
         QWidget sizeHint impelemtation

+ 8 - 8
appGUI/preferences/tools/ToolsPreferencesUI.py

@@ -81,26 +81,26 @@ class ToolsPreferencesUI(QtWidgets.QWidget):
         self.vlay = QtWidgets.QVBoxLayout()
 
         self.vlay.addWidget(self.tools_iso_group)
-        self.vlay.addWidget(self.tools_drill_group)
+        self.vlay.addWidget(self.tools_2sided_group)
+        self.vlay.addWidget(self.tools_cutout_group)
 
         self.vlay1 = QtWidgets.QVBoxLayout()
-        self.vlay1.addWidget(self.tools_ncc_group)
-        self.vlay1.addWidget(self.tools_2sided_group)
-        self.vlay1.addWidget(self.tools_cutout_group)
-        self.vlay1.addWidget(self.tools_sub_group)
+        self.vlay1.addWidget(self.tools_drill_group)
+        self.vlay1.addWidget(self.tools_panelize_group)
 
         self.vlay2 = QtWidgets.QVBoxLayout()
+        self.vlay2.addWidget(self.tools_ncc_group)
         self.vlay2.addWidget(self.tools_paint_group)
-        self.vlay2.addWidget(self.tools_transform_group)
 
         self.vlay3 = QtWidgets.QVBoxLayout()
         self.vlay3.addWidget(self.tools_film_group)
-        self.vlay3.addWidget(self.tools_calculators_group)
+        self.vlay3.addWidget(self.tools_transform_group)
 
         self.vlay4 = QtWidgets.QVBoxLayout()
         self.vlay4.addWidget(self.tools_solderpaste_group)
         self.vlay4.addWidget(self.tools_corners_group)
-        self.vlay4.addWidget(self.tools_panelize_group)
+        self.vlay4.addWidget(self.tools_calculators_group)
+        self.vlay4.addWidget(self.tools_sub_group)
 
         self.layout.addLayout(self.vlay)
         self.layout.addLayout(self.vlay1)

+ 1 - 1
appTranslation.py

@@ -218,7 +218,7 @@ def restart_program(app, ask=None):
         response = msgbox.clickedButton()
 
         if response == bt_yes:
-            app.on_file_saveprojectas(use_thread=True, quit_action=True)
+            app.f_handlers.on_file_saveprojectas(use_thread=True, quit_action=True)
 
     app.preferencesUiManager.save_defaults()
     python = sys.executable

+ 3 - 3
app_Main.py

@@ -9022,7 +9022,7 @@ class MenuFileHandlers(QtCore.QObject):
 
         date = str(datetime.today()).rpartition('.')[0]
         date = ''.join(c for c in date if c not in ':-')
-        date = self.date.replace(' ', '_')
+        date = date.replace(' ', '_')
 
         filter_ = "FlatCAM Project .FlatPrj (*.FlatPrj);; All Files (*.*)"
         try:
@@ -10390,8 +10390,8 @@ class MenuFileHandlers(QtCore.QObject):
             # Serialize the whole project
             d = {
                 "objs":     [obj.to_dict() for obj in self.app.collection.get_list()],
-                "options":  self.options,
-                "version":  self.version
+                "options":  self.app.options,
+                "version":  self.app.version
             }
 
             if self.defaults["global_save_compressed"] is True:

BIN
locale/ro/LC_MESSAGES/strings.mo


+ 2 - 2
locale/ro/LC_MESSAGES/strings.po

@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: \n"
 "POT-Creation-Date: 2020-10-27 01:13+0200\n"
-"PO-Revision-Date: 2020-10-27 01:17+0200\n"
+"PO-Revision-Date: 2020-10-27 01:39+0200\n"
 "Last-Translator: \n"
 "Language-Team: \n"
 "Language: ro\n"
@@ -356,7 +356,7 @@ msgstr "Găurire"
 #: appDatabase.py:2178 appTools/ToolIsolation.py:1101
 #: appTools/ToolIsolation.py:2576 appTools/ToolNCC.py:4060
 msgid "Isolation"
-msgstr "Tip de izolare"
+msgstr "Izolare"
 
 #: appDatabase.py:275 appDatabase.py:1850 appDatabase.py:2186
 #: appEditors/AppGeoEditor.py:528 appGUI/MainGUI.py:1618