- updated the translation template POT file and the EN PO/MO files

- Gerber Editor: added toggle effect to the Transform Tool
- Gerber Editor: added shortcut for Transform Tool and also toggle effect here, too
- updated the shortcut list with the Gerber Editor shortcut keys
- Gerber Editor: fixed error when adding an aperture with code value lower than the ones that already exists
This commit is contained in:
Marius Stanciu 2019-04-12 16:46:43 +03:00 committed by Marius
parent f1b034e50c
commit 8b46d0d6cf
6 changed files with 8214 additions and 6107 deletions

View File

@ -15,6 +15,11 @@ CAD program, and create G-Code for Isolation routing.
- fixed an issue with automatically filled in aperture code when the edited Gerber file has no apertures; established an default with value 10 (according to Gerber specifications)
- fixed a bug in editing a blank Gerber object
- added handlers for the Gerber Editor context menu
- updated the translation template POT file and the EN PO/MO files
- Gerber Editor: added toggle effect to the Transform Tool
- Gerber Editor: added shortcut for Transform Tool and also toggle effect here, too
- updated the shortcut list with the Gerber Editor shortcut keys
- Gerber Editor: fixed error when adding an aperture with code value lower than the ones that already exists
11.04.2019

View File

@ -2099,8 +2099,9 @@ class FlatCAMGrbEditor(QtCore.QObject):
self.selected = []
try:
selected_apid = str(self.tool2tooldia[row + 1])
self.last_aperture_selected = self.apertures_table.item(row, 1).text()
# selected_apid = str(self.tool2tooldia[row + 1])
selected_apid = self.apertures_table.item(row, 1).text()
self.last_aperture_selected = selected_apid
for obj in self.storage_dict[selected_apid]['solid_geometry']:
self.selected.append(obj)
@ -2719,6 +2720,12 @@ class FlatCAMGrbEditor(QtCore.QObject):
self.plot_all()
self.app.inform.emit(_("[success] Done. Scale Tool completed."))
def on_transform(self):
if type(self.active_tool) == FCTransform:
self.select_tool('select')
else:
self.select_tool('transform')
def hide_tool(self, tool_name):
# self.app.ui.notebook.setTabText(2, _("Tools"))
@ -3104,15 +3111,25 @@ class TransformEditorTool(FlatCAMTool):
self.set_tool_ui()
def run(self):
def run(self, toggle=True):
self.app.report_usage("Geo Editor Transform Tool()")
FlatCAMTool.run(self)
self.set_tool_ui()
# if the splitter us hidden, display it
# if the splitter is hidden, display it, else hide it but only if the current widget is the same
if self.app.ui.splitter.sizes()[0] == 0:
self.app.ui.splitter.setSizes([1, 1])
if toggle:
try:
if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName:
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
else:
self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
except AttributeError:
pass
FlatCAMTool.run(self)
self.set_tool_ui()
self.app.ui.notebook.setTabText(2, _("Transform Tool"))
def install(self, icon=None, separator=None, **kwargs):

View File

@ -1413,6 +1413,81 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
<td>&nbsp;Save Object and Exit Editor</td>
</tr>
</tbody>
</table>
<br>
<br>
<strong><span style="color:#00ff00">GERBER EDITOR</span></strong><br>
<table border="0" cellpadding="0" cellspacing="0" style="width:283px">
<tbody>
<tr height="20">
<td height="20" width="89"><strong>A</strong></td>
<td width="194">&nbsp;Add Pad Array</td>
</tr>
<tr height="20">
<td height="20"><strong>B</strong></td>
<td>&nbsp;Buffer</td>
</tr>
<tr height="20">
<td height="20"><strong>C</strong></td>
<td>&nbsp;Copy</td>
</tr>
<tr height="20">
<td height="20"><strong>J</strong></td>
<td>&nbsp;Jump to Location (x, y)</td>
</tr>
<tr height="20">
<td height="20"><strong>M</strong></td>
<td>&nbsp;Move</td>
</tr>
<tr height="20">
<td height="20"><strong>N</strong></td>
<td>&nbsp;Add Region</td>
</tr>
<tr height="20">
<td height="20"><strong>P</strong></td>
<td>&nbsp;Add Pad</td>
</tr>
<tr height="20">
<td height="20"><strong>S</strong></td>
<td>&nbsp;Scale</td>
</tr>
<tr height="20">
<td height="20"><strong>T</strong></td>
<td>&nbsp;Add Track</td>
</tr>
<tr height="20">
<td height="20">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr height="20">
<td height="20"><strong>Del</strong></td>
<td>&nbsp;Delete</td>
</tr>
<tr height="20">
<td height="20"><strong>Del</strong></td>
<td>&nbsp;Alternate: Delete Apertures</td>
</tr>
<tr height="20">
<td height="20">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr height="20">
<td height="20"><strong>ESC</strong></td>
<td>&nbsp;Abort and return to Select</td>
</tr>
<tr height="20">
<td height="20"><strong>CTRL+S</strong></td>
<td>&nbsp;Save Object and Exit Editor</td>
</tr>
<tr height="20">
<td height="20">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr height="20">
<td height="20"><strong>ALT+R</strong></td>
<td>&nbsp;Transformation Tool</td>
</tr>
</tbody>
</table>
'''
)
@ -2450,7 +2525,11 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
elif modifiers == QtCore.Qt.ShiftModifier:
pass
elif modifiers == QtCore.Qt.AltModifier:
pass
# Transformation Tool
if key == QtCore.Qt.Key_R or key == 'R':
self.app.grb_editor.on_transform()
return
elif modifiers == QtCore.Qt.NoModifier:
# Abort the current action
if key == QtCore.Qt.Key_Escape or key == 'Escape':
@ -2584,6 +2663,12 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
self.app.inform.emit(_("[WARNING_NOTCL] Cancelled. Nothing selected to move."))
return
# Add Region Tool
if key == QtCore.Qt.Key_N or key == 'N':
self.app.grb_editor.launched_from_shortcuts = True
self.app.grb_editor.select_tool('region')
return
# Add Pad Tool
if key == QtCore.Qt.Key_P or key == 'P':
self.app.grb_editor.launched_from_shortcuts = True
@ -2596,12 +2681,6 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
self.app.grb_editor.select_tool('pad')
return
# Add Region Tool
if key == QtCore.Qt.Key_R or key == 'R':
self.app.grb_editor.launched_from_shortcuts = True
self.app.grb_editor.select_tool('region')
return
# Scale Tool
if key == QtCore.Qt.Key_S or key == 'S':
self.app.grb_editor.launched_from_shortcuts = True

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff