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

- fixed the Tcl command Plot_All that malfunctioned if there were any FlatCAM scripts (or FlatCAM documents) open
- updated the shortcuts list

Marius Stanciu 5 лет назад
Родитель
Сommit
32ff35b4ff
3 измененных файлов с 17 добавлено и 7 удалено
  1. 2 0
      CHANGELOG.md
  2. 6 5
      FlatCAMObj.py
  3. 9 2
      flatcamGUI/FlatCAMGUI.py

+ 2 - 0
CHANGELOG.md

@@ -15,6 +15,8 @@ CHANGELOG for FlatCAM beta
 - in App.on_mouse_move_over_plot() method no longer will be done a setFocus() on every move, only when it is needed
 - in App.on_mouse_move_over_plot() method no longer will be done a setFocus() on every move, only when it is needed
 - added an extra check if old preferences files are detected, a check if the type of the values is the same with the type in the current preferences file. If the type is not the same then the current type is preferred.
 - added an extra check if old preferences files are detected, a check if the type of the values is the same with the type in the current preferences file. If the type is not the same then the current type is preferred.
 - aligned the Tcl commands display when the Help Tcl command is run without parameters
 - aligned the Tcl commands display when the Help Tcl command is run without parameters
+- fixed the Tcl command Plot_All that malfunctioned if there were any FlatCAM scripts (or FlatCAM documents) open
+- updated the shortcuts list
 
 
 22.04.2020 
 22.04.2020 
 
 

+ 6 - 5
FlatCAMObj.py

@@ -384,13 +384,13 @@ class FlatCAMObj(QtCore.QObject):
             pass
             pass
             # self.app.log.warning("Failed to read option from field: %s" % option)
             # self.app.log.warning("Failed to read option from field: %s" % option)
 
 
-    def plot(self):
+    def plot(self, kind=None) -> bool:
         """
         """
         Plot this object (Extend this method to implement the actual plotting).
         Plot this object (Extend this method to implement the actual plotting).
         Call this in descendants before doing the plotting.
         Call this in descendants before doing the plotting.
 
 
-        :return: Whether to continue plotting or not depending on the "plot" option.
-        :rtype: bool
+        :param kind:    Used by only some of the FlatCAM objects
+        :return:        Whether to continue plotting or not depending on the "plot" option. Boolean
         """
         """
         FlatCAMApp.App.log.debug(str(inspect.stack()[1][3]) + " --> FlatCAMObj.plot()")
         FlatCAMApp.App.log.debug(str(inspect.stack()[1][3]) + " --> FlatCAMObj.plot()")
 
 
@@ -1761,10 +1761,11 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
         # self.options['isotooldia'] = float(self.options['isotooldia']) * factor
         # self.options['isotooldia'] = float(self.options['isotooldia']) * factor
         # self.options['bboxmargin'] = float(self.options['bboxmargin']) * factor
         # self.options['bboxmargin'] = float(self.options['bboxmargin']) * factor
 
 
-    def plot(self, **kwargs):
+    def plot(self, kind=None, **kwargs):
         """
         """
 
 
-        :param kwargs: color and face_color
+        :param kind:    Not used, for compatibility with the plot method for other objects
+        :param kwargs:  Color and face_color, visible
         :return:
         :return:
         """
         """
         FlatCAMApp.App.log.debug(str(inspect.stack()[1][3]) + " --> FlatCAMGerber.plot()")
         FlatCAMApp.App.log.debug(str(inspect.stack()[1][3]) + " --> FlatCAMGerber.plot()")

+ 9 - 2
flatcamGUI/FlatCAMGUI.py

@@ -53,8 +53,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
         self.shell_dock.setObjectName('Shell_DockWidget')
         self.shell_dock.setObjectName('Shell_DockWidget')
         self.shell_dock.setAllowedAreas(QtCore.Qt.AllDockWidgetAreas)
         self.shell_dock.setAllowedAreas(QtCore.Qt.AllDockWidgetAreas)
         self.shell_dock.setFeatures(QtWidgets.QDockWidget.DockWidgetMovable |
         self.shell_dock.setFeatures(QtWidgets.QDockWidget.DockWidgetMovable |
-                                       QtWidgets.QDockWidget.DockWidgetFloatable |
-                                       QtWidgets.QDockWidget.DockWidgetClosable)
+                                    QtWidgets.QDockWidget.DockWidgetFloatable |
+                                    QtWidgets.QDockWidget.DockWidgetClosable)
         self.addDockWidget(QtCore.Qt.BottomDockWidgetArea, self.shell_dock)
         self.addDockWidget(QtCore.Qt.BottomDockWidgetArea, self.shell_dock)
 
 
         # #######################################################################
         # #######################################################################
@@ -1656,6 +1656,11 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                         <td height="20"><strong>Ctrl+Shift+S</strong></td>
                         <td height="20"><strong>Ctrl+Shift+S</strong></td>
                         <td>&nbsp;%s</td>
                         <td>&nbsp;%s</td>
                     </tr>
                     </tr>
+                    </tr>
+                    <tr height="20">
+                        <td height="20"><strong>Ctrl+Shift+V</strong></td>
+                        <td>&nbsp;%s</td>
+                    </tr>
                     <tr height="20">
                     <tr height="20">
                         <td height="20">&nbsp;</td>
                         <td height="20">&nbsp;</td>
                         <td>&nbsp;</td>
                         <td>&nbsp;</td>
@@ -1715,6 +1720,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                 _("Open Preferences Window"),
                 _("Open Preferences Window"),
                 _("Rotate by 90 degree CCW"), _("Run a Script"), _("Toggle the workspace"), _("Skew on X axis"),
                 _("Rotate by 90 degree CCW"), _("Run a Script"), _("Toggle the workspace"), _("Skew on X axis"),
                 _("Skew on Y axis"),
                 _("Skew on Y axis"),
+
                 # ALT section
                 # ALT section
                 _("Align Objects Tool"), _("Calculators Tool"), _("2-Sided PCB Tool"), _("Transformations Tool"),
                 _("Align Objects Tool"), _("Calculators Tool"), _("2-Sided PCB Tool"), _("Transformations Tool"),
                 _("Punch Gerber Tool"), _("Extract Drills Tool"), _("Fiducials Tool"),
                 _("Punch Gerber Tool"), _("Extract Drills Tool"), _("Fiducials Tool"),
@@ -1730,6 +1736,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
 
 
                 # CTRL + SHIFT section
                 # CTRL + SHIFT section
                 _("Save Project As"),
                 _("Save Project As"),
+                _("Paste Special. Will convert a Windows path style to the one required in Tcl Shell"),
 
 
                 # F keys section
                 # F keys section
                 _("Open Online Manual"),
                 _("Open Online Manual"),