From 32ff35b4ff68b6e06671a45caa52fd63dc8ad344 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Thu, 23 Apr 2020 03:34:09 +0300 Subject: [PATCH] - fixed the Tcl command Plot_All that malfunctioned if there were any FlatCAM scripts (or FlatCAM documents) open - updated the shortcuts list --- CHANGELOG.md | 2 ++ FlatCAMObj.py | 11 ++++++----- flatcamGUI/FlatCAMGUI.py | 11 +++++++++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f331da4..1bde9477 100644 --- a/CHANGELOG.md +++ b/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 - 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 +- 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 diff --git a/FlatCAMObj.py b/FlatCAMObj.py index 5176ea16..bf4d5aa8 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -384,13 +384,13 @@ class FlatCAMObj(QtCore.QObject): pass # 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). 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()") @@ -1761,10 +1761,11 @@ class FlatCAMGerber(FlatCAMObj, Gerber): # self.options['isotooldia'] = float(self.options['isotooldia']) * 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: """ FlatCAMApp.App.log.debug(str(inspect.stack()[1][3]) + " --> FlatCAMGerber.plot()") diff --git a/flatcamGUI/FlatCAMGUI.py b/flatcamGUI/FlatCAMGUI.py index 6f1fe86e..394af02e 100644 --- a/flatcamGUI/FlatCAMGUI.py +++ b/flatcamGUI/FlatCAMGUI.py @@ -53,8 +53,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow): self.shell_dock.setObjectName('Shell_DockWidget') self.shell_dock.setAllowedAreas(QtCore.Qt.AllDockWidgetAreas) 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) # ####################################################################### @@ -1656,6 +1656,11 @@ class FlatCAMGUI(QtWidgets.QMainWindow): Ctrl+Shift+S  %s + + + Ctrl+Shift+V +  %s +     @@ -1715,6 +1720,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow): _("Open Preferences Window"), _("Rotate by 90 degree CCW"), _("Run a Script"), _("Toggle the workspace"), _("Skew on X axis"), _("Skew on Y axis"), + # ALT section _("Align Objects Tool"), _("Calculators Tool"), _("2-Sided PCB Tool"), _("Transformations Tool"), _("Punch Gerber Tool"), _("Extract Drills Tool"), _("Fiducials Tool"), @@ -1730,6 +1736,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow): # CTRL + SHIFT section _("Save Project As"), + _("Paste Special. Will convert a Windows path style to the one required in Tcl Shell"), # F keys section _("Open Online Manual"),