- in Paint Tool and NCC Tool fixed the RMB click detection when Area selection is used
This commit is contained in:
parent
c0cab6ee23
commit
e8aba2cdb7
|
@ -19,6 +19,7 @@ CAD program, and create G-Code for Isolation routing.
|
||||||
- fixed German language translation
|
- fixed German language translation
|
||||||
- in NCC Tool added a warning in case there are isolation tools and if those isolation's are interrupted by an area or a box
|
- in NCC Tool added a warning in case there are isolation tools and if those isolation's are interrupted by an area or a box
|
||||||
- in Paint Tool made that the area selection is repeated until RMB click
|
- in Paint Tool made that the area selection is repeated until RMB click
|
||||||
|
- in Paint Tool and NCC Tool fixed the RMB click detection when Area selection is used
|
||||||
|
|
||||||
2.09.2019
|
2.09.2019
|
||||||
|
|
||||||
|
|
|
@ -1202,8 +1202,9 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
||||||
# self.app.plotcanvas.vis_connect('mouse_press', self.app.on_mouse_click_over_plot)
|
# self.app.plotcanvas.vis_connect('mouse_press', self.app.on_mouse_click_over_plot)
|
||||||
# self.app.plotcanvas.vis_connect('mouse_move', self.app.on_mouse_move_over_plot)
|
# self.app.plotcanvas.vis_connect('mouse_move', self.app.on_mouse_move_over_plot)
|
||||||
# self.app.plotcanvas.vis_connect('mouse_release', self.app.on_mouse_click_release_over_plot)
|
# self.app.plotcanvas.vis_connect('mouse_release', self.app.on_mouse_click_release_over_plot)
|
||||||
elif event.button == 2 and self.first_click == False and self.mouse_is_dragging == False:
|
elif event.button == 2 and self.mouse_is_dragging == False:
|
||||||
self.first_click = False
|
self.first_click = False
|
||||||
|
|
||||||
self.app.plotcanvas.vis_disconnect('mouse_release', on_mouse_release)
|
self.app.plotcanvas.vis_disconnect('mouse_release', on_mouse_release)
|
||||||
self.app.plotcanvas.vis_disconnect('mouse_move', on_mouse_move)
|
self.app.plotcanvas.vis_disconnect('mouse_move', on_mouse_move)
|
||||||
|
|
||||||
|
@ -1211,6 +1212,9 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
||||||
self.app.plotcanvas.vis_connect('mouse_move', self.app.on_mouse_move_over_plot)
|
self.app.plotcanvas.vis_connect('mouse_move', self.app.on_mouse_move_over_plot)
|
||||||
self.app.plotcanvas.vis_connect('mouse_release', self.app.on_mouse_click_release_over_plot)
|
self.app.plotcanvas.vis_connect('mouse_release', self.app.on_mouse_click_release_over_plot)
|
||||||
|
|
||||||
|
if len(self.sel_rect) == 0:
|
||||||
|
return
|
||||||
|
|
||||||
self.sel_rect = cascaded_union(self.sel_rect)
|
self.sel_rect = cascaded_union(self.sel_rect)
|
||||||
self.clear_copper(ncc_obj=self.ncc_obj,
|
self.clear_copper(ncc_obj=self.ncc_obj,
|
||||||
sel_obj=self.bound_obj,
|
sel_obj=self.bound_obj,
|
||||||
|
@ -1228,12 +1232,13 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
||||||
curr_pos = self.app.plotcanvas.translate_coords(event.pos)
|
curr_pos = self.app.plotcanvas.translate_coords(event.pos)
|
||||||
self.app.app_cursor.enabled = False
|
self.app.app_cursor.enabled = False
|
||||||
|
|
||||||
if event.button == 2:
|
# detect mouse dragging motion
|
||||||
if event.is_dragging is True:
|
if event.is_dragging is True:
|
||||||
self.mouse_is_dragging = True
|
self.mouse_is_dragging = True
|
||||||
else:
|
else:
|
||||||
self.mouse_is_dragging = False
|
self.mouse_is_dragging = False
|
||||||
|
|
||||||
|
# update the cursor position
|
||||||
if self.app.grid_status() == True:
|
if self.app.grid_status() == True:
|
||||||
self.app.app_cursor.enabled = True
|
self.app.app_cursor.enabled = True
|
||||||
# Update cursor
|
# Update cursor
|
||||||
|
@ -1241,6 +1246,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
||||||
self.app.app_cursor.set_data(np.asarray([(curr_pos[0], curr_pos[1])]),
|
self.app.app_cursor.set_data(np.asarray([(curr_pos[0], curr_pos[1])]),
|
||||||
symbol='++', edge_color='black', size=20)
|
symbol='++', edge_color='black', size=20)
|
||||||
|
|
||||||
|
# draw the utility geometry
|
||||||
if self.first_click:
|
if self.first_click:
|
||||||
self.app.delete_selection_shape()
|
self.app.delete_selection_shape()
|
||||||
self.app.draw_moving_selection_shape(old_coords=(self.cursor_pos[0], self.cursor_pos[1]),
|
self.app.draw_moving_selection_shape(old_coords=(self.cursor_pos[0], self.cursor_pos[1]),
|
||||||
|
|
|
@ -1060,8 +1060,9 @@ class ToolPaint(FlatCAMTool, Gerber):
|
||||||
# self.app.plotcanvas.vis_connect('mouse_press', self.app.on_mouse_click_over_plot)
|
# self.app.plotcanvas.vis_connect('mouse_press', self.app.on_mouse_click_over_plot)
|
||||||
# self.app.plotcanvas.vis_connect('mouse_move', self.app.on_mouse_move_over_plot)
|
# self.app.plotcanvas.vis_connect('mouse_move', self.app.on_mouse_move_over_plot)
|
||||||
# self.app.plotcanvas.vis_connect('mouse_release', self.app.on_mouse_click_release_over_plot)
|
# self.app.plotcanvas.vis_connect('mouse_release', self.app.on_mouse_click_release_over_plot)
|
||||||
elif event.button == 2 and self.first_click is False and self.mouse_is_dragging is False:
|
elif event.button == 2 and self.mouse_is_dragging is False:
|
||||||
self.first_click = False
|
self.first_click = False
|
||||||
|
|
||||||
self.app.plotcanvas.vis_disconnect('mouse_release', on_mouse_release)
|
self.app.plotcanvas.vis_disconnect('mouse_release', on_mouse_release)
|
||||||
self.app.plotcanvas.vis_disconnect('mouse_move', on_mouse_move)
|
self.app.plotcanvas.vis_disconnect('mouse_move', on_mouse_move)
|
||||||
|
|
||||||
|
@ -1069,6 +1070,9 @@ class ToolPaint(FlatCAMTool, Gerber):
|
||||||
self.app.plotcanvas.vis_connect('mouse_move', self.app.on_mouse_move_over_plot)
|
self.app.plotcanvas.vis_connect('mouse_move', self.app.on_mouse_move_over_plot)
|
||||||
self.app.plotcanvas.vis_connect('mouse_release', self.app.on_mouse_click_release_over_plot)
|
self.app.plotcanvas.vis_connect('mouse_release', self.app.on_mouse_click_release_over_plot)
|
||||||
|
|
||||||
|
if len(self.sel_rect) == 0:
|
||||||
|
return
|
||||||
|
|
||||||
self.sel_rect = cascaded_union(self.sel_rect)
|
self.sel_rect = cascaded_union(self.sel_rect)
|
||||||
self.paint_poly_area(obj=self.paint_obj,
|
self.paint_poly_area(obj=self.paint_obj,
|
||||||
tooldia=tooldia_list,
|
tooldia=tooldia_list,
|
||||||
|
@ -1083,12 +1087,13 @@ class ToolPaint(FlatCAMTool, Gerber):
|
||||||
curr_pos = self.app.plotcanvas.translate_coords(event.pos)
|
curr_pos = self.app.plotcanvas.translate_coords(event.pos)
|
||||||
self.app.app_cursor.enabled = False
|
self.app.app_cursor.enabled = False
|
||||||
|
|
||||||
if event.button == 2:
|
# detect mouse dragging motion
|
||||||
if event.is_dragging is True:
|
if event.is_dragging is True:
|
||||||
self.mouse_is_dragging = True
|
self.mouse_is_dragging = True
|
||||||
else:
|
else:
|
||||||
self.mouse_is_dragging = False
|
self.mouse_is_dragging = False
|
||||||
|
|
||||||
|
# update the cursor position
|
||||||
if self.app.grid_status() == True:
|
if self.app.grid_status() == True:
|
||||||
self.app.app_cursor.enabled = True
|
self.app.app_cursor.enabled = True
|
||||||
# Update cursor
|
# Update cursor
|
||||||
|
@ -1096,6 +1101,7 @@ class ToolPaint(FlatCAMTool, Gerber):
|
||||||
self.app.app_cursor.set_data(np.asarray([(curr_pos[0], curr_pos[1])]),
|
self.app.app_cursor.set_data(np.asarray([(curr_pos[0], curr_pos[1])]),
|
||||||
symbol='++', edge_color='black', size=20)
|
symbol='++', edge_color='black', size=20)
|
||||||
|
|
||||||
|
# draw the utility geometry
|
||||||
if self.first_click:
|
if self.first_click:
|
||||||
self.app.delete_selection_shape()
|
self.app.delete_selection_shape()
|
||||||
self.app.draw_moving_selection_shape(old_coords=(self.cursor_pos[0], self.cursor_pos[1]),
|
self.app.draw_moving_selection_shape(old_coords=(self.cursor_pos[0], self.cursor_pos[1]),
|
||||||
|
|
Loading…
Reference in New Issue