Prechádzať zdrojové kódy

- fixed the annotation plotting in the CNCJob object
- created a new InputDialog widget that has the buttons and the context menu translated and replaced the old widget throughout the app
- updated the translation strings

Marius Stanciu 5 rokov pred
rodič
commit
d4fec5ae60

+ 6 - 0
CHANGELOG.md

@@ -7,6 +7,12 @@ CHANGELOG for FlatCAM beta
 
 =================================================
 
+5.11.2020
+
+- fixed the annotation plotting in the CNCJob object
+- created a new InputDialog widget that has the buttons and the context menu translated and replaced the old widget throughout the app
+- updated the translation strings
+
 4.11.2020
 
 - updated all the translation files

+ 31 - 31
appEditors/AppGeoEditor.py

@@ -17,7 +17,7 @@ from PyQt5.QtCore import Qt
 from camlib import distance, arc, three_point_circle, Geometry, FlatCAMRTreeStorage
 from appTool import AppTool
 from appGUI.GUIElements import OptionalInputSection, FCCheckBox, FCLabel, FCComboBox, FCTextAreaRich, \
-    FCDoubleSpinner, FCButton, FCInputDialog, FCTree, NumericalEvalTupleEntry
+    FCDoubleSpinner, FCButton, FCInputDoubleSpinner, FCTree, NumericalEvalTupleEntry
 from appParsers.ParseFont import *
 
 from shapely.geometry import LineString, LinearRing, MultiLineString, Polygon, MultiPolygon, Point
@@ -1445,12 +1445,12 @@ class TransformEditorTool(AppTool):
                     return
 
     def on_rotate_key(self):
-        val_box = FCInputDialog(title=_("Rotate ..."),
-                                text='%s:' % _('Enter an Angle Value (degrees)'),
-                                min=-359.9999, max=360.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_rotate']),
-                                parent=self.app.ui)
-        val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/rotate.png'))
+        val_box = FCInputDoubleSpinner(title=_("Rotate ..."),
+                                       text='%s:' % _('Enter an Angle Value (degrees)'),
+                                       min=-359.9999, max=360.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_rotate']),
+                                       parent=self.app.ui)
+        val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/rotate.png'))
 
         val, ok = val_box.get_value()
         if ok:
@@ -1463,12 +1463,12 @@ class TransformEditorTool(AppTool):
     def on_offx_key(self):
         units = self.app.defaults['units'].lower()
 
-        val_box = FCInputDialog(title=_("Offset on X axis ..."),
-                                text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
-                                min=-10000.0000, max=10000.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_offset_x']),
-                                parent=self.app.ui)
-        val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsetx32.png'))
+        val_box = FCInputDoubleSpinner(title=_("Offset on X axis ..."),
+                                       text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
+                                       min=-10000.0000, max=10000.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_offset_x']),
+                                       parent=self.app.ui)
+        val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/offsetx32.png'))
 
         val, ok = val_box.get_value()
         if ok:
@@ -1481,12 +1481,12 @@ class TransformEditorTool(AppTool):
     def on_offy_key(self):
         units = self.app.defaults['units'].lower()
 
-        val_box = FCInputDialog(title=_("Offset on Y axis ..."),
-                                text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
-                                min=-10000.0000, max=10000.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_offset_y']),
-                                parent=self.app.ui)
-        val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsety32.png'))
+        val_box = FCInputDoubleSpinner(title=_("Offset on Y axis ..."),
+                                       text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
+                                       min=-10000.0000, max=10000.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_offset_y']),
+                                       parent=self.app.ui)
+        val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/offsety32.png'))
 
         val, ok = val_box.get_value()
         if ok:
@@ -1497,12 +1497,12 @@ class TransformEditorTool(AppTool):
             self.app.inform.emit('[success] %s...' % _("Offset on the Y axis canceled"))
 
     def on_skewx_key(self):
-        val_box = FCInputDialog(title=_("Skew on X axis ..."),
-                                text='%s:' % _('Enter an Angle Value (degrees)'),
-                                min=-359.9999, max=360.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_skew_x']),
-                                parent=self.app.ui)
-        val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/skewX.png'))
+        val_box = FCInputDoubleSpinner(title=_("Skew on X axis ..."),
+                                       text='%s:' % _('Enter an Angle Value (degrees)'),
+                                       min=-359.9999, max=360.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_skew_x']),
+                                       parent=self.app.ui)
+        val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/skewX.png'))
 
         val, ok = val_box.get_value()
         if ok:
@@ -1513,12 +1513,12 @@ class TransformEditorTool(AppTool):
             self.app.inform.emit('[success] %s...' % _("Skew on X axis canceled"))
 
     def on_skewy_key(self):
-        val_box = FCInputDialog(title=_("Skew on Y axis ..."),
-                                text='%s:' % _('Enter an Angle Value (degrees)'),
-                                min=-359.9999, max=360.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_skew_y']),
-                                parent=self.app.ui)
-        val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/skewY.png'))
+        val_box = FCInputDoubleSpinner(title=_("Skew on Y axis ..."),
+                                       text='%s:' % _('Enter an Angle Value (degrees)'),
+                                       min=-359.9999, max=360.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_skew_y']),
+                                       parent=self.app.ui)
+        val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/skewY.png'))
 
         val, ok = val_box.get_value()
         if ok:

+ 28 - 28
appEditors/AppGerberEditor.py

@@ -19,7 +19,7 @@ import logging
 
 from camlib import distance, arc, three_point_circle
 from appGUI.GUIElements import FCEntry, FCComboBox, FCTable, FCDoubleSpinner, FCSpinner, RadioSet, EvalEntry2, \
-    FCInputDialog, FCButton, OptionalInputSection, FCCheckBox, NumericalEvalTupleEntry, FCComboBox2, FCLabel
+    FCInputDoubleSpinner, FCButton, OptionalInputSection, FCCheckBox, NumericalEvalTupleEntry, FCComboBox2, FCLabel
 from appTool import AppTool
 
 import numpy as np
@@ -6348,12 +6348,12 @@ class TransformEditorTool(AppTool):
                 return
 
     def on_rotate_key(self):
-        val_box = FCInputDialog(title=_("Rotate ..."),
-                                text='%s:' % _('Enter an Angle Value (degrees)'),
-                                min=-359.9999, max=360.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_rotate']),
-                                parent=self.app.ui)
-        val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/rotate.png'))
+        val_box = FCInputDoubleSpinner(title=_("Rotate ..."),
+                                       text='%s:' % _('Enter an Angle Value (degrees)'),
+                                       min=-359.9999, max=360.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_rotate']),
+                                       parent=self.app.ui)
+        val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/rotate.png'))
 
         val, ok = val_box.get_value()
         if ok:
@@ -6366,11 +6366,11 @@ class TransformEditorTool(AppTool):
     def on_offx_key(self):
         units = self.app.defaults['units'].lower()
 
-        val_box = FCInputDialog(title=_("Offset on X axis ..."),
-                                text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
-                                min=-10000.0000, max=10000.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_offset_x']),
-                                parent=self.app.ui)
+        val_box = FCInputDoubleSpinner(title=_("Offset on X axis ..."),
+                                       text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
+                                       min=-10000.0000, max=10000.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_offset_x']),
+                                       parent=self.app.ui)
         val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsetx32.png'))
 
         val, ok = val_box.get_value()
@@ -6384,12 +6384,12 @@ class TransformEditorTool(AppTool):
     def on_offy_key(self):
         units = self.app.defaults['units'].lower()
 
-        val_box = FCInputDialog(title=_("Offset on Y axis ..."),
-                                text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
-                                min=-10000.0000, max=10000.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_offset_y']),
-                                parent=self.app.ui)
-        val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsety32.png'))
+        val_box = FCInputDoubleSpinner(title=_("Offset on Y axis ..."),
+                                       text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
+                                       min=-10000.0000, max=10000.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_offset_y']),
+                                       parent=self.app.ui)
+        val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/offsety32.png'))
 
         val, ok = val_box.get_value()
         if ok:
@@ -6400,11 +6400,11 @@ class TransformEditorTool(AppTool):
             self.app.inform.emit('[WARNING_NOTCL] %s...' % _("Offset Y cancelled"))
 
     def on_skewx_key(self):
-        val_box = FCInputDialog(title=_("Skew on X axis ..."),
-                                text='%s:' % _('Enter an Angle Value (degrees)'),
-                                min=-359.9999, max=360.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_skew_x']),
-                                parent=self.app.ui)
+        val_box = FCInputDoubleSpinner(title=_("Skew on X axis ..."),
+                                       text='%s:' % _('Enter an Angle Value (degrees)'),
+                                       min=-359.9999, max=360.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_skew_x']),
+                                       parent=self.app.ui)
         val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/skewX.png'))
 
         val, ok = val_box.get_value()
@@ -6416,11 +6416,11 @@ class TransformEditorTool(AppTool):
             self.app.inform.emit('[WARNING_NOTCL] %s...' % _("Skew X cancelled"))
 
     def on_skewy_key(self):
-        val_box = FCInputDialog(title=_("Skew on Y axis ..."),
-                                text='%s:' % _('Enter an Angle Value (degrees)'),
-                                min=-359.9999, max=360.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_skew_y']),
-                                parent=self.app.ui)
+        val_box = FCInputDoubleSpinner(title=_("Skew on Y axis ..."),
+                                       text='%s:' % _('Enter an Angle Value (degrees)'),
+                                       min=-359.9999, max=360.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_skew_y']),
+                                       parent=self.app.ui)
         val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/skewY.png'))
 
         val, ok = val_box.get_value()

+ 93 - 0
appGUI/GUIElements.py

@@ -2220,6 +2220,84 @@ class FCInputDialog(QtWidgets.QInputDialog):
         pass
 
 
+class FCInputDoubleSpinner(QtWidgets.QDialog):
+    def __init__(self, parent=None, title=None, text=None,
+                 min=0.0, max=100.0000, step=1, decimals=4, init_val=None):
+        super(FCInputDoubleSpinner, self).__init__(parent)
+
+        self.val = 0.0
+
+        self.init_value = init_val if init_val else 0.0
+
+        self.setWindowTitle(title) if title else self.setWindowTitle('title')
+        self.text = text if text else 'text'
+
+        self.min = min
+        self.max = max
+        self.step = step
+        self.decimals = decimals
+
+        self.lbl = FCLabel(self.text)
+
+        if title is None:
+            self.title = 'title'
+        else:
+            self.title = title
+        if text is None:
+            self.text = 'text'
+        else:
+            self.text = text
+
+        self.wdg = FCDoubleSpinner()
+        self.wdg.set_value(self.init_value)
+
+        QBtn = QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel
+
+        self.buttonBox = QtWidgets.QDialogButtonBox(QBtn)
+        self.buttonBox.accepted.connect(self.accept)
+        self.buttonBox.rejected.connect(self.reject)
+
+        self.layout = QtWidgets.QVBoxLayout()
+        self.layout.addWidget(self.lbl)
+        self.layout.addWidget(self.wdg)
+        self.layout.addWidget(self.buttonBox)
+
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setText(_("Ok"))
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Cancel).setText(_("Cancel"))
+
+        self.setLayout(self.layout)
+
+    def set_title(self, txt):
+        self.setWindowTitle(txt)
+
+    def set_text(self, txt):
+        self.lbl.set_value(txt)
+
+    def set_icon(self, icon):
+        self.setWindowIcon(icon)
+
+    def set_min(self, val):
+        self.wdg.setMinimum(val)
+
+    def set_max(self, val):
+        self.wdg.setMaximum(val)
+
+    def set_range(self, min, max):
+        self.wdg.set_range(min, max)
+
+    def set_step(self, val):
+        self.wdg.set_step(val)
+
+    def set_value(self, val):
+        self.wdg.set_value(val)
+
+    def get_value(self):
+        if self.exec_() == QtWidgets.QDialog.Accepted:
+            return self.wdg.get_value(), True
+        else:
+            return None, False
+
+
 class FCInputSpinner(QtWidgets.QDialog):
     def __init__(self, parent=None, title=None, text=None, min=None, max=None, decimals=4, step=1, init_val=None):
         super().__init__(parent)
@@ -2253,6 +2331,9 @@ class FCInputSpinner(QtWidgets.QDialog):
         self.buttonBox.accepted.connect(self.accept)
         self.buttonBox.rejected.connect(self.reject)
 
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setText(_("Ok"))
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Cancel).setText(_("Cancel"))
+
         self.layout = QtWidgets.QVBoxLayout()
         self.layout.addWidget(self.lbl)
         self.layout.addWidget(self.wdg)
@@ -2311,6 +2392,9 @@ class FCInputDialogSlider(QtWidgets.QDialog):
         self.buttonBox.accepted.connect(self.accept)
         self.buttonBox.rejected.connect(self.reject)
 
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setText(_("Ok"))
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Cancel).setText(_("Cancel"))
+
         self.layout = QtWidgets.QVBoxLayout()
         self.layout.addWidget(self.lbl)
         self.layout.addWidget(self.wdg)
@@ -2372,6 +2456,9 @@ class FCInputDialogSpinnerButton(QtWidgets.QDialog):
         self.buttonBox.accepted.connect(self.accept)
         self.buttonBox.rejected.connect(self.reject)
 
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setText(_("Ok"))
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Cancel).setText(_("Cancel"))
+
         self.layout = QtWidgets.QVBoxLayout()
         self.layout.addWidget(self.lbl)
         self.layout.addWidget(self.wdg)
@@ -2384,6 +2471,9 @@ class FCInputDialogSpinnerButton(QtWidgets.QDialog):
     def set_text(self, txt):
         self.lbl.set_value(txt)
 
+    def set_icon(self, icon):
+        self.setWindowIcon(icon)
+
     def set_min(self, val):
         self.wdg.spinner.setMinimum(val)
 
@@ -3708,6 +3798,9 @@ class DialogBoxRadio(QtWidgets.QDialog):
                                                      orientation=Qt.Horizontal, parent=self)
         self.form.addRow(self.button_box)
 
+        self.button_box.button(QtWidgets.QDialogButtonBox.Ok).setText(_("Ok"))
+        self.button_box.button(QtWidgets.QDialogButtonBox.Cancel).setText(_("Cancel"))
+
         self.button_box.accepted.connect(self.accept)
         self.button_box.rejected.connect(self.reject)
 

+ 4 - 4
appGUI/MainGUI.py

@@ -3646,10 +3646,10 @@ class MainGUI(QtWidgets.QMainWindow):
                         self.app.exc_editor.launched_from_shortcuts = True
                         # ## Current application units in Upper Case
                         self.units = self.general_defaults_form.general_app_group.units_radio.get_value().upper()
-                        tool_add_popup = FCInputDialog(title='%s ...' % _("New Tool"),
-                                                       text='%s:' % _('Enter a Tool Diameter'),
-                                                       min=0.0000, max=99.9999, decimals=4)
-                        tool_add_popup.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/letter_t_32.png'))
+                        tool_add_popup = FCInputDoubleSpinner(title='%s ...' % _("New Tool"),
+                                                              text='%s:' % _('Enter a Tool Diameter'),
+                                                              min=0.0000, max=99.9999, decimals=self.decimals)
+                        tool_add_popup.set_icon(QtGui.QIcon(self.app.resource_location + '/letter_t_32.png'))
 
                         val, ok = tool_add_popup.get_value()
                         if ok:

+ 18 - 10
appObjects/FlatCAMCNCJob.py

@@ -2509,10 +2509,10 @@ class CNCJobObject(FlatCAMObj, CNCjob):
             if self.app.is_legacy is False:
                 self.annotation.clear(update=True)
 
-        # Annotaions shapes plotting
+        # Annotations shapes plotting
         try:
             if self.app.is_legacy is False:
-                if self.ui.annotation_cb.get_value() and self.ui.plot_cb.get_value():
+                if self.ui.annotation_cb.get_value() and visible:
                     self.plot_annotations(obj=self, visible=True)
                 else:
                     self.plot_annotations(obj=self, visible=False)
@@ -2521,20 +2521,28 @@ class CNCJobObject(FlatCAMObj, CNCjob):
             if self.app.is_legacy is False:
                 self.annotation.clear(update=True)
 
-    def on_annotation_change(self):
+    def on_annotation_change(self, val):
         """
         Handler for toggling the annotation display by clicking a checkbox.
         :return:
         """
 
         if self.app.is_legacy is False:
-            if self.ui.annotation_cb.get_value():
-                self.text_col.enabled = True
-            else:
-                self.text_col.enabled = False
-            # kind = self.ui.cncplot_method_combo.get_value()
-            # self.plot(kind=kind)
-            self.annotation.redraw()
+            # self.text_col.visible = True if val == 2 else False
+            # self.plot(kind=self.ui.cncplot_method_combo.get_value())
+            # Annotations shapes plotting
+            try:
+                if self.app.is_legacy is False:
+                    if val and self.ui.plot_cb.get_value():
+                        self.plot_annotations(obj=self, visible=True)
+                    else:
+                        self.plot_annotations(obj=self, visible=False)
+
+            except (ObjectDeleted, AttributeError):
+                if self.app.is_legacy is False:
+                    self.annotation.clear(update=True)
+
+            # self.annotation.redraw()
         else:
             kind = self.ui.cncplot_method_combo.get_value()
             self.plot(kind=kind)

+ 7 - 7
appTools/ToolPaint.py

@@ -13,8 +13,8 @@ from copy import deepcopy
 
 from appParsers.ParseGerber import Gerber
 from camlib import Geometry, FlatCAMRTreeStorage, grace
-from appGUI.GUIElements import FCTable, FCDoubleSpinner, FCCheckBox, FCInputDialog, RadioSet, FCButton, FCComboBox, \
-    FCLabel, FCComboBox2
+from appGUI.GUIElements import FCTable, FCDoubleSpinner, FCCheckBox, FCInputDoubleSpinner, RadioSet, \
+    FCButton, FCComboBox, FCLabel, FCComboBox2
 
 from shapely.geometry import base, Polygon, MultiPolygon, LinearRing, Point
 from shapely.ops import unary_union, linemerge
@@ -381,11 +381,11 @@ class ToolPaint(AppTool, Gerber):
         self.blockSignals(False)
 
     def on_add_tool_by_key(self):
-        tool_add_popup = FCInputDialog(title='%s...' % _("New Tool"),
-                                       text='%s:' % _('Enter a Tool Diameter'),
-                                       min=0.0000, max=99.9999, decimals=4,
-                                       parent=self.app.ui)
-        tool_add_popup.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/letter_t_32.png'))
+        tool_add_popup = FCInputDoubleSpinner(title='%s...' % _("New Tool"),
+                                              text='%s:' % _('Enter a Tool Diameter'),
+                                              min=0.0000, max=99.9999, decimals=self.decimals,
+                                              parent=self.app.ui)
+        tool_add_popup.set_icon(QtGui.QIcon(self.app.resource_location + '/letter_t_32.png'))
 
         val, ok = tool_add_popup.get_value()
         if ok:

+ 26 - 20
app_Main.py

@@ -6115,10 +6115,12 @@ class App(QtCore.QObject):
             self.inform.emit('[WARNING_NOTCL] %s' % _("No object is selected."))
         else:
             if silent is False:
-                rotatebox = FCInputDialog(title=_("Transform"), text=_("Enter the Angle value:"),
-                                          min=-360, max=360, decimals=4,
-                                          init_val=float(self.defaults['tools_transform_rotate']),
-                                          parent=self.ui)
+                rotatebox = FCInputDoubleSpinner(title=_("Transform"), text=_("Enter the Angle value:"),
+                                                 min=-360, max=360, decimals=4,
+                                                 init_val=float(self.defaults['tools_transform_rotate']),
+                                                 parent=self.ui)
+                rotatebox.setWindowIcon(QtGui.QIcon(self.resource_location + '/rotate.png'))
+
                 num, ok = rotatebox.get_value()
             else:
                 num = preset
@@ -6167,10 +6169,12 @@ class App(QtCore.QObject):
         if not obj_list:
             self.inform.emit('[WARNING_NOTCL] %s' % _("No object is selected."))
         else:
-            skewxbox = FCInputDialog(title=_("Transform"), text=_("Enter the Angle value:"),
-                                     min=-360, max=360, decimals=4,
-                                     init_val=float(self.defaults['tools_transform_skew_x']),
-                                     parent=self.ui)
+            skewxbox = FCInputDoubleSpinner(title=_("Transform"), text=_("Enter the Angle value:"),
+                                            min=-360, max=360, decimals=4,
+                                            init_val=float(self.defaults['tools_transform_skew_x']),
+                                            parent=self.ui)
+            skewxbox.setWindowIcon(QtGui.QIcon(self.resource_location + '/skewX.png'))
+
             num, ok = skewxbox.get_value()
             if ok:
                 # first get a bounding box to fit all
@@ -6205,10 +6209,12 @@ class App(QtCore.QObject):
         if not obj_list:
             self.inform.emit('[WARNING_NOTCL] %s' % _("No object is selected."))
         else:
-            skewybox = FCInputDialog(title=_("Transform"), text=_("Enter the Angle value:"),
-                                     min=-360, max=360, decimals=4,
-                                     init_val=float(self.defaults['tools_transform_skew_y']),
-                                     parent=self.ui)
+            skewybox = FCInputDoubleSpinner(title=_("Transform"), text=_("Enter the Angle value:"),
+                                            min=-360, max=360, decimals=4,
+                                            init_val=float(self.defaults['tools_transform_skew_y']),
+                                            parent=self.ui)
+            skewybox.setWindowIcon(QtGui.QIcon(self.resource_location + '/skewY.png'))
+
             num, ok = skewybox.get_value()
             if ok:
                 # first get a bounding box to fit all
@@ -6307,10 +6313,10 @@ class App(QtCore.QObject):
         # ## Current application units in lower Case
         units = self.defaults['units'].lower()
 
-        grid_add_popup = FCInputDialog(title=_("New Grid ..."),
-                                       text=_('Enter a Grid Value:'),
-                                       min=0.0000, max=99.9999, decimals=4,
-                                       parent=self.ui)
+        grid_add_popup = FCInputDoubleSpinner(title=_("New Grid ..."),
+                                              text=_('Enter a Grid Value:'),
+                                              min=0.0000, max=99.9999, decimals=self.decimals,
+                                              parent=self.ui)
         grid_add_popup.setWindowIcon(QtGui.QIcon(self.resource_location + '/plus32.png'))
 
         val, ok = grid_add_popup.get_value()
@@ -6332,10 +6338,10 @@ class App(QtCore.QObject):
         # ## Current application units in lower Case
         units = self.defaults['units'].lower()
 
-        grid_del_popup = FCInputDialog(title="Delete Grid ...",
-                                       text='Enter a Grid Value:',
-                                       min=0.0000, max=99.9999, decimals=4,
-                                       parent=self.ui)
+        grid_del_popup = FCInputDoubleSpinner(title="Delete Grid ...",
+                                              text='Enter a Grid Value:',
+                                              min=0.0000, max=99.9999, decimals=self.decimals,
+                                              parent=self.ui)
         grid_del_popup.setWindowIcon(QtGui.QIcon(self.resource_location + '/delete32.png'))
 
         val, ok = grid_del_popup.get_value()

+ 5 - 3
camlib.py

@@ -6830,7 +6830,7 @@ class CNCjob(Geometry):
 
         :param obj:         FlatCAM CNCJob object for which to plot the annotations
         :type obj:
-        :param visible:     annotaions visibility
+        :param visible:     annotations visibility
         :type visible:      bool
         :return:            Nothing
         :rtype:
@@ -6840,9 +6840,11 @@ class CNCjob(Geometry):
             return
 
         if visible is True:
-            obj.text_col.enabled = True
+            if self.app.is_legacy is False:
+                obj.annotation.clear(update=True)
+            obj.text_col.visible = True
         else:
-            obj.text_col.enabled = False
+            obj.text_col.visible = False
             return
 
         text = []

BIN
locale/de/LC_MESSAGES/strings.mo


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 170 - 168
locale/de/LC_MESSAGES/strings.po


BIN
locale/en/LC_MESSAGES/strings.mo


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 170 - 170
locale/en/LC_MESSAGES/strings.po


BIN
locale/es/LC_MESSAGES/strings.mo


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 170 - 168
locale/es/LC_MESSAGES/strings.po


BIN
locale/fr/LC_MESSAGES/strings.mo


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 170 - 168
locale/fr/LC_MESSAGES/strings.po


BIN
locale/it/LC_MESSAGES/strings.mo


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 170 - 168
locale/it/LC_MESSAGES/strings.po


BIN
locale/pt_BR/LC_MESSAGES/strings.mo


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 170 - 168
locale/pt_BR/LC_MESSAGES/strings.po


BIN
locale/ro/LC_MESSAGES/strings.mo


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 170 - 168
locale/ro/LC_MESSAGES/strings.po


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 169 - 167
locale/ru/LC_MESSAGES/strings.po


BIN
locale/tr/LC_MESSAGES/strings.mo


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 174 - 176
locale/tr/LC_MESSAGES/strings.po


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 173 - 171
locale_template/strings.pot


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov