- soled bug in Gerber Editor: the '0' aperture (the region aperture) had no size which created errors. Made the size to be zero.

- solved bug in editors: the canvas selection shape was not deleted on mouse release if the grid snap was OFF
- solved bug in Excellon Editor: when selecting a drill hole on canvas the selected row in the Tools Table was not the correct onw but the next highest row
This commit is contained in:
Marius Stanciu
2019-04-29 22:28:45 +03:00
parent 43c539702e
commit 91e6cc0bff
6 changed files with 43 additions and 36 deletions

View File

@@ -643,7 +643,7 @@ class FCDrillSelect(DrawTool):
sel_tools.add(storage)
for storage in sel_tools:
self.exc_editor_app.tools_table_exc.selectRow(int(storage))
self.exc_editor_app.tools_table_exc.selectRow(int(storage) - 1)
self.draw_app.last_tool_selected = int(storage)
self.exc_editor_app.tools_table_exc.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
@@ -2129,11 +2129,16 @@ class FlatCAMExcEditor(QtCore.QObject):
"%.4f    " % (0, 0))
self.pos = self.canvas.vispy_canvas.translate_coords(event.pos)
### Snap coordinates
x, y = self.app.geo_editor.snap(self.pos[0], self.pos[1])
self.pos = (x, y)
# print(self.active_tool)
# Snap coordinates
if self.app.grid_status():
self.pos = self.app.geo_editor.snap(self.pos[0], self.pos[1])
self.app.app_cursor.enabled = True
# Update cursor
self.app.app_cursor.set_data(np.asarray([(self.pos[0], self.pos[1])]), symbol='++', edge_color='black',
size=20)
else:
self.pos = (self.pos[0], self.pos[1])
self.app.app_cursor.enabled = False
# Selection with left mouse button
if self.active_tool is not None and event.button is 1:

View File

@@ -3321,6 +3321,7 @@ class FlatCAMGeoEditor(QtCore.QObject):
self.app.app_cursor.set_data(np.asarray([(self.pos[0], self.pos[1])]), symbol='++', edge_color='black',
size=20)
else:
self.pos = (self.pos[0], self.pos[1])
self.app.app_cursor.enabled = False
if event.button is 1:

View File

@@ -3245,9 +3245,9 @@ class FlatCAMGrbEditor(QtCore.QObject):
self.app.app_cursor.set_data(np.asarray([(self.pos[0], self.pos[1])]), symbol='++', edge_color='black',
size=20)
else:
self.pos = (self.pos[0], self.pos[1])
self.app.app_cursor.enabled = False
if event.button is 1:
self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f&nbsp;&nbsp; <b>Dy</b>: "
"%.4f&nbsp;&nbsp;&nbsp;&nbsp;" % (0, 0))
@@ -3377,6 +3377,7 @@ class FlatCAMGrbEditor(QtCore.QObject):
:type Bool
:return:
"""
poly_selection = Polygon([start_pos, (end_pos[0], start_pos[1]), end_pos, (start_pos[0], end_pos[1])])
sel_aperture = set()
self.apertures_table.clearSelection()