- in Gerber Editor added the shortcut key 'Space' to change the direction of the array of pads
This commit is contained in:
parent
846c0dc59d
commit
675c7028bb
|
@ -16,6 +16,7 @@ CHANGELOG for FlatCAM beta
|
||||||
- updated the translation strings
|
- updated the translation strings
|
||||||
- fixed the UI layout in Excellon Editor and made sure that after changing a value in the Notebook side after the mouse is inside the canvas, the canvas takes the focus allowing the key shortcuts to work
|
- fixed the UI layout in Excellon Editor and made sure that after changing a value in the Notebook side after the mouse is inside the canvas, the canvas takes the focus allowing the key shortcuts to work
|
||||||
- Turkish language strings updated (by Mehmet Kaya)
|
- Turkish language strings updated (by Mehmet Kaya)
|
||||||
|
- in Gerber Editor added the shortcut key 'Space' to change the direction of the array of pads
|
||||||
|
|
||||||
3.11.2020
|
3.11.2020
|
||||||
|
|
||||||
|
|
|
@ -744,6 +744,31 @@ class FCPadArray(FCShapeTool):
|
||||||
self.draw_app.ui.array_frame.hide()
|
self.draw_app.ui.array_frame.hide()
|
||||||
self.draw_app.app.jump_signal.disconnect()
|
self.draw_app.app.jump_signal.disconnect()
|
||||||
|
|
||||||
|
def on_key(self, key):
|
||||||
|
key_modifier = QtWidgets.QApplication.keyboardModifiers()
|
||||||
|
|
||||||
|
if key_modifier == QtCore.Qt.ShiftModifier:
|
||||||
|
mod_key = 'Shift'
|
||||||
|
elif key_modifier == QtCore.Qt.ControlModifier:
|
||||||
|
mod_key = 'Control'
|
||||||
|
else:
|
||||||
|
mod_key = None
|
||||||
|
|
||||||
|
if mod_key == 'Control':
|
||||||
|
pass
|
||||||
|
elif mod_key is None:
|
||||||
|
# Toggle Drill Array Direction
|
||||||
|
if key == QtCore.Qt.Key_Space:
|
||||||
|
if self.draw_app.ui.pad_axis_radio.get_value() == 'X':
|
||||||
|
self.draw_app.ui.pad_axis_radio.set_value('Y')
|
||||||
|
elif self.draw_app.ui.pad_axis_radio.get_value() == 'Y':
|
||||||
|
self.draw_app.ui.pad_axis_radio.set_value('A')
|
||||||
|
elif self.draw_app.ui.pad_axis_radio.get_value() == 'A':
|
||||||
|
self.draw_app.ui.pad_axis_radio.set_value('X')
|
||||||
|
|
||||||
|
# ## Utility geometry (animated)
|
||||||
|
self.draw_app.update_utility_geometry(data=(self.draw_app.snap_x, self.draw_app.snap_y))
|
||||||
|
|
||||||
def clean_up(self):
|
def clean_up(self):
|
||||||
self.draw_app.selected = []
|
self.draw_app.selected = []
|
||||||
self.draw_app.ui.apertures_table.clearSelection()
|
self.draw_app.ui.apertures_table.clearSelection()
|
||||||
|
|
|
@ -3277,10 +3277,6 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||||
self.on_toggle_notebook()
|
self.on_toggle_notebook()
|
||||||
return
|
return
|
||||||
|
|
||||||
# Rotate
|
|
||||||
if key == QtCore.Qt.Key_Space or key == 'Space':
|
|
||||||
self.app.grb_editor.transform_tool.on_rotate_key()
|
|
||||||
|
|
||||||
# Switch to Project Tab
|
# Switch to Project Tab
|
||||||
if key == QtCore.Qt.Key_1 or key == '1':
|
if key == QtCore.Qt.Key_1 or key == '1':
|
||||||
self.app.grb_editor.launched_from_shortcuts = True
|
self.app.grb_editor.launched_from_shortcuts = True
|
||||||
|
@ -3306,6 +3302,11 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||||
if response is not None:
|
if response is not None:
|
||||||
self.app.inform.emit(response)
|
self.app.inform.emit(response)
|
||||||
else:
|
else:
|
||||||
|
|
||||||
|
# Rotate
|
||||||
|
if key == QtCore.Qt.Key_Space or key == 'Space':
|
||||||
|
self.app.grb_editor.transform_tool.on_rotate_key()
|
||||||
|
|
||||||
# Add Array of pads
|
# Add Array of pads
|
||||||
if key == QtCore.Qt.Key_A or key == 'A':
|
if key == QtCore.Qt.Key_A or key == 'A':
|
||||||
self.app.grb_editor.launched_from_shortcuts = True
|
self.app.grb_editor.launched_from_shortcuts = True
|
||||||
|
@ -4823,7 +4824,7 @@ class ShortcutsTab(QtWidgets.QWidget):
|
||||||
_('Esc'), _("Abort and return to Select"),
|
_('Esc'), _("Abort and return to Select"),
|
||||||
_('Space'), _("Toggle Slot direction"),
|
_('Space'), _("Toggle Slot direction"),
|
||||||
_('Ctrl+S'), _("Save Object and Exit Editor"),
|
_('Ctrl+S'), _("Save Object and Exit Editor"),
|
||||||
_('Ctrl+Space'), _("Toggle Slot Array direction")
|
_('Ctrl+Space'), _("Toggle array direction")
|
||||||
)
|
)
|
||||||
|
|
||||||
# GERBER EDITOR SHORTCUT LIST
|
# GERBER EDITOR SHORTCUT LIST
|
||||||
|
@ -4900,6 +4901,11 @@ class ShortcutsTab(QtWidgets.QWidget):
|
||||||
<td height="20"><strong>%s</strong></td>
|
<td height="20"><strong>%s</strong></td>
|
||||||
<td> %s</td>
|
<td> %s</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</tr>
|
||||||
|
<tr height="20">
|
||||||
|
<td height="20"><strong>%s</strong></td>
|
||||||
|
<td> %s</td>
|
||||||
|
</tr>
|
||||||
<tr height="20">
|
<tr height="20">
|
||||||
<td height="20"> </td>
|
<td height="20"> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
|
@ -4957,6 +4963,7 @@ class ShortcutsTab(QtWidgets.QWidget):
|
||||||
_('Del'), _("Delete"),
|
_('Del'), _("Delete"),
|
||||||
_('Del'), _("Alternate: Delete Apertures"),
|
_('Del'), _("Alternate: Delete Apertures"),
|
||||||
_('Esc'), _("Abort and return to Select"),
|
_('Esc'), _("Abort and return to Select"),
|
||||||
|
_('Space'), _("Toggle array direction"),
|
||||||
_('Shift+M'), _("Distance Minimum Tool"),
|
_('Shift+M'), _("Distance Minimum Tool"),
|
||||||
_('Ctrl+E'), _("Eraser Tool"),
|
_('Ctrl+E'), _("Eraser Tool"),
|
||||||
_('Ctrl+S'), _("Save Object and Exit Editor"),
|
_('Ctrl+S'), _("Save Object and Exit Editor"),
|
||||||
|
|
Loading…
Reference in New Issue