Jelajahi Sumber

- added shortcut key combo 'SHIFT+S' for Running a Script.

Marius Stanciu 7 tahun lalu
induk
melakukan
a9bc0dea56
4 mengubah file dengan 14 tambahan dan 2 penghapusan
  1. 6 0
      FlatCAMApp.py
  2. 1 1
      FlatCAMGUI.py
  3. 6 1
      ObjectCollection.py
  4. 1 0
      README.md

+ 6 - 0
FlatCAMApp.py

@@ -3672,6 +3672,10 @@ class App(QtCore.QObject):
             if event.key == 'R':
                 self.on_rotate(silent=True, preset=-90)
 
+            # Run a Script
+            if event.key == 'S':
+                self.on_filerunscript()
+
             # Toggle Workspace
             if event.key == 'W':
                 self.on_workspace_menu()
@@ -3781,6 +3785,7 @@ class App(QtCore.QObject):
 <b>E:</b>       Edit Object (if selected)<br>
 <b>G:</b>       Grid On/Off<br>
 <b>J:</b>       Jump to Coordinates<br>
+<b>L:</b>       New Excellon<br>
 <b>M:</b>       Move Obj<br>
 <b>M:</b>       Move Geo Item (when in Edit Mode)<br>
 <b>N:</b>       New Geometry<br>
@@ -3812,6 +3817,7 @@ class App(QtCore.QObject):
 <b>SHIFT+G:</b>  Toggle the axis<br>
 <b>SHIFT+P:</b>  Open Preferences Window<br>
 <b>SHIFT+R:</b>  Rotate by 90 degree CCW<br>
+<b>SHIFT+S:</b>  Run a Script<br>
 <b>SHIFT+W:</b>  Toggle the workspace<br>
 <b>SHIFT+X:</b>  Skew on X axis<br>
 <b>SHIFT+Y:</b>  Skew on Y axis<br>

+ 1 - 1
FlatCAMGUI.py

@@ -72,7 +72,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
         self.menufile.addSeparator()
 
         # Run Scripts
-        self.menufilerunscript = QtWidgets.QAction(QtGui.QIcon('share/script16.png'), 'Run Script ...', self)
+        self.menufilerunscript = QtWidgets.QAction(QtGui.QIcon('share/script16.png'), 'Run Script ...\tSHIFT+S', self)
         self.menufile.addAction(self.menufilerunscript)
 
         # Separator

+ 6 - 1
ObjectCollection.py

@@ -304,6 +304,11 @@ class ObjectCollection(QtCore.QAbstractItemModel):
                 self.app.on_rotate(silent=True, preset=-90)
                 return
 
+            # Run a Script
+            if key == QtCore.Qt.Key_S:
+                self.app.on_filerunscript()
+                return
+
             # Toggle Workspace
             if key == QtCore.Qt.Key_W:
                 self.app.on_workspace_menu()
@@ -331,7 +336,7 @@ class ObjectCollection(QtCore.QAbstractItemModel):
 
             # Transformation Tool
             if key == QtCore.Qt.Key_R:
-                self.app.measurement_tool.run()
+                self.app.transform_tool.run()
                 return
 
             # Cutout Tool

+ 1 - 0
README.md

@@ -16,6 +16,7 @@ CAD program, and create G-Code for Isolation routing.
 - redesigned the messagebox that is showed when quiting ot creating a New Project: now it has an option ('Cancel') to abort the process returning to the app
 - added options for trace segmentation that can be useful for auto-levelling (code snippet from Lei Zheng from a rejected pull request on FlatCAM https://bitbucket.org/realthunder/ )
 - added shortcut key 'L' for creating 'New Excellon' 
+- added shortcut key combo 'SHIFT+S' for Running a Script.
 
 26.01.2019