Merged marius_stanciu/flatcam_beta/Beta_8.994 into Beta
This commit is contained in:
commit
172246141c
|
@ -22,6 +22,10 @@ CHANGELOG for FlatCAM beta
|
|||
- fixed an error in Gerber parser, when it encounter a pen-up followed by pen-down move while in a region
|
||||
- trimmed the application strings
|
||||
- updated the Italian translation (by Massimiliano Golfetto)
|
||||
- fixed a series of issues in Gerber Editor tools when the user is trying to use the tools by preselecting a aperture without size (aperture macro)
|
||||
- moved all the UI stuff out of the Gerber Editor class in its own class
|
||||
- in the Excellon Editor, added shortcut keys Space and Ctrl+Space for toggling the direction of the Slots, respectively for the Array of Slots
|
||||
- updated the translation strings to the latest changes in the app strings
|
||||
|
||||
2.11.2020
|
||||
|
||||
|
|
|
@ -538,6 +538,31 @@ class FCDrillArray(FCShapeTool):
|
|||
|
||||
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':
|
||||
# Toggle Pad Array Direction
|
||||
if key == QtCore.Qt.Key_Space:
|
||||
if self.draw_app.e_ui.slot_array_axis_radio.get_value() == 'X':
|
||||
self.draw_app.e_ui.slot_array_axis_radio.set_value('Y')
|
||||
elif self.draw_app.e_ui.slot_array_axis_radio.get_value() == 'Y':
|
||||
self.draw_app.e_ui.slot_array_axis_radio.set_value('A')
|
||||
elif self.draw_app.e_ui.slot_array_axis_radio.get_value() == 'A':
|
||||
self.draw_app.e_ui.slot_array_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))
|
||||
elif mod_key is None:
|
||||
pass
|
||||
|
||||
def clean_up(self):
|
||||
self.draw_app.selected = []
|
||||
self.draw_app.e_ui.tools_table_exc.clearSelection()
|
||||
|
@ -740,6 +765,18 @@ class FCSlot(FCShapeTool):
|
|||
self.draw_app.e_ui.slot_frame.hide()
|
||||
self.draw_app.app.jump_signal.disconnect()
|
||||
|
||||
def on_key(self, key):
|
||||
# Toggle Pad Direction
|
||||
if key == QtCore.Qt.Key_Space:
|
||||
if self.draw_app.e_ui.slot_axis_radio.get_value() == 'X':
|
||||
self.draw_app.e_ui.slot_axis_radio.set_value('Y')
|
||||
elif self.draw_app.e_ui.slot_axis_radio.get_value() == 'Y':
|
||||
self.draw_app.e_ui.slot_axis_radio.set_value('A')
|
||||
elif self.draw_app.e_ui.slot_axis_radio.get_value() == 'A':
|
||||
self.draw_app.e_ui.slot_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):
|
||||
self.draw_app.selected = []
|
||||
self.draw_app.e_ui.tools_table_exc.clearSelection()
|
||||
|
@ -1065,6 +1102,40 @@ class FCSlotArray(FCShapeTool):
|
|||
self.draw_app.e_ui.slot_array_frame.hide()
|
||||
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':
|
||||
# Toggle Pad Array Direction
|
||||
if key == QtCore.Qt.Key_Space:
|
||||
if self.draw_app.e_ui.slot_array_axis_radio.get_value() == 'X':
|
||||
self.draw_app.e_ui.slot_array_axis_radio.set_value('Y')
|
||||
elif self.draw_app.e_ui.slot_array_axis_radio.get_value() == 'Y':
|
||||
self.draw_app.e_ui.slot_array_axis_radio.set_value('A')
|
||||
elif self.draw_app.e_ui.slot_array_axis_radio.get_value() == 'A':
|
||||
self.draw_app.e_ui.slot_array_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))
|
||||
elif mod_key is None:
|
||||
# Toggle Pad Direction
|
||||
if key == QtCore.Qt.Key_Space:
|
||||
if self.draw_app.e_ui.slot_axis_radio.get_value() == 'X':
|
||||
self.draw_app.e_ui.slot_axis_radio.set_value('Y')
|
||||
elif self.draw_app.e_ui.slot_axis_radio.get_value() == 'Y':
|
||||
self.draw_app.e_ui.slot_axis_radio.set_value('A')
|
||||
elif self.draw_app.e_ui.slot_axis_radio.get_value() == 'A':
|
||||
self.draw_app.e_ui.slot_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):
|
||||
self.draw_app.selected = []
|
||||
self.draw_app.e_ui.tools_table_exc.clearSelection()
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3436,6 +3436,16 @@ class MainGUI(QtWidgets.QMainWindow):
|
|||
if key == QtCore.Qt.Key_M or key == 'M':
|
||||
self.app.distance_tool.run()
|
||||
return
|
||||
|
||||
# we do this so we can reuse the following keys while inside a Tool
|
||||
# the above keys are general enough so were left outside
|
||||
if self.app.exc_editor.active_tool is not None and self.select_drill_btn.isChecked() is False:
|
||||
response = self.app.exc_editor.active_tool.on_key(key=key)
|
||||
if response is not None:
|
||||
self.app.inform.emit(response)
|
||||
else:
|
||||
pass
|
||||
|
||||
# SHIFT
|
||||
elif modifiers == QtCore.Qt.ShiftModifier:
|
||||
# Run Distance Minimum Tool
|
||||
|
@ -4774,6 +4784,14 @@ class ShortcutsTab(QtWidgets.QWidget):
|
|||
<td height="20"><strong>%s</strong></td>
|
||||
<td> %s</td>
|
||||
</tr>
|
||||
<tr height="20">
|
||||
<td height="20"><strong>%s</strong></td>
|
||||
<td> %s</td>
|
||||
</tr>
|
||||
<tr height="20">
|
||||
<td height="20"><strong>%s</strong></td>
|
||||
<td> %s</td>
|
||||
</tr>
|
||||
<tr height="20">
|
||||
<td height="20"> </td>
|
||||
<td> </td>
|
||||
|
@ -4804,7 +4822,9 @@ class ShortcutsTab(QtWidgets.QWidget):
|
|||
_('Del'), _("Delete Drill"),
|
||||
_('Del'), _("Alternate: Delete Tool"),
|
||||
_('Esc'), _("Abort and return to Select"),
|
||||
_('Ctrl+S'), _("Save Object and Exit Editor")
|
||||
_('Space'), _("Toggle Slot direction"),
|
||||
_('Ctrl+S'), _("Save Object and Exit Editor"),
|
||||
_('Ctrl+Space'), _("Toggle Slot Array direction")
|
||||
)
|
||||
|
||||
# GERBER EDITOR SHORTCUT LIST
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue