- fixed bugs in Paint Tool when painting single polygon
This commit is contained in:
@@ -1126,7 +1126,8 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
|
|||||||
self.app.tool_shapes.clear(update=True)
|
self.app.tool_shapes.clear(update=True)
|
||||||
|
|
||||||
if self.poly_dict:
|
if self.poly_dict:
|
||||||
self.isolate(iso_type=self.iso_type, geometry=self.poly_list)
|
poly_list = self.poly_dict.values()
|
||||||
|
self.isolate(iso_type=self.iso_type, geometry=poly_list)
|
||||||
else:
|
else:
|
||||||
self.app.inform.emit('[ERROR_NOTCL] %s' % _("List of single polygons is empty. Aborting."))
|
self.app.inform.emit('[ERROR_NOTCL] %s' % _("List of single polygons is empty. Aborting."))
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
- made some optimizations in FlatCAMGerber.isolate() method
|
- made some optimizations in FlatCAMGerber.isolate() method
|
||||||
- updated the 'single' isolation of Gerber polygons to remove the polygon if clicked on it and it is already in the list of single polygons to be isolated
|
- updated the 'single' isolation of Gerber polygons to remove the polygon if clicked on it and it is already in the list of single polygons to be isolated
|
||||||
- clicking to add a polygon when doing Single type isolation will add a blue shape marking the selected polygon, second click will remove that shape
|
- clicking to add a polygon when doing Single type isolation will add a blue shape marking the selected polygon, second click will remove that shape
|
||||||
|
- fixed bugs in Paint Tool when painting single polygon
|
||||||
|
|
||||||
23.11.2019
|
23.11.2019
|
||||||
|
|
||||||
|
|||||||
@@ -1028,7 +1028,7 @@ class ToolPaint(FlatCAMTool, Gerber):
|
|||||||
# do paint single only for left mouse clicks
|
# do paint single only for left mouse clicks
|
||||||
if event.button == 1:
|
if event.button == 1:
|
||||||
self.app.inform.emit(_("Painting polygon..."))
|
self.app.inform.emit(_("Painting polygon..."))
|
||||||
if self.app.is_legacy:
|
if self.app.is_legacy is False:
|
||||||
self.app.plotcanvas.graph_event_disconnect('mouse_press', doit)
|
self.app.plotcanvas.graph_event_disconnect('mouse_press', doit)
|
||||||
else:
|
else:
|
||||||
self.app.plotcanvas.graph_event_disconnect(self.mp)
|
self.app.plotcanvas.graph_event_disconnect(self.mp)
|
||||||
@@ -1054,6 +1054,7 @@ class ToolPaint(FlatCAMTool, Gerber):
|
|||||||
else:
|
else:
|
||||||
self.app.plotcanvas.graph_event_disconnect(self.app.mr)
|
self.app.plotcanvas.graph_event_disconnect(self.app.mr)
|
||||||
self.app.plotcanvas.graph_event_disconnect(self.app.mp)
|
self.app.plotcanvas.graph_event_disconnect(self.app.mp)
|
||||||
|
|
||||||
self.mp = self.app.plotcanvas.graph_event_connect('mouse_press', doit)
|
self.mp = self.app.plotcanvas.graph_event_connect('mouse_press', doit)
|
||||||
|
|
||||||
elif self.select_method == "area":
|
elif self.select_method == "area":
|
||||||
@@ -1416,9 +1417,9 @@ class ToolPaint(FlatCAMTool, Gerber):
|
|||||||
if isinstance(poly_buf, MultiPolygon):
|
if isinstance(poly_buf, MultiPolygon):
|
||||||
cp = []
|
cp = []
|
||||||
for pp in poly_buf:
|
for pp in poly_buf:
|
||||||
cp.append(paint_p(pp, tooldia=tool_dia))
|
cp.append(paint_p(pp, tooldiameter=tool_dia))
|
||||||
else:
|
else:
|
||||||
cp = paint_p(poly_buf, tooldia=tool_dia)
|
cp = paint_p(poly_buf, tooldiameter=tool_dia)
|
||||||
|
|
||||||
if cp is not None:
|
if cp is not None:
|
||||||
if isinstance(cp, list):
|
if isinstance(cp, list):
|
||||||
|
|||||||
Reference in New Issue
Block a user