diff --git a/FlatCAMObj.py b/FlatCAMObj.py index d6f6f492..0847bd8d 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -1126,7 +1126,8 @@ class FlatCAMGerber(FlatCAMObj, Gerber): self.app.tool_shapes.clear(update=True) 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: self.app.inform.emit('[ERROR_NOTCL] %s' % _("List of single polygons is empty. Aborting.")) diff --git a/README.md b/README.md index a0dd631b..3734e6fc 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ CAD program, and create G-Code for Isolation routing. - 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 - 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 diff --git a/flatcamTools/ToolPaint.py b/flatcamTools/ToolPaint.py index 112ed4d6..463cdeb9 100644 --- a/flatcamTools/ToolPaint.py +++ b/flatcamTools/ToolPaint.py @@ -1028,7 +1028,7 @@ class ToolPaint(FlatCAMTool, Gerber): # do paint single only for left mouse clicks if event.button == 1: 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) else: self.app.plotcanvas.graph_event_disconnect(self.mp) @@ -1054,6 +1054,7 @@ class ToolPaint(FlatCAMTool, Gerber): else: self.app.plotcanvas.graph_event_disconnect(self.app.mr) self.app.plotcanvas.graph_event_disconnect(self.app.mp) + self.mp = self.app.plotcanvas.graph_event_connect('mouse_press', doit) elif self.select_method == "area": @@ -1416,9 +1417,9 @@ class ToolPaint(FlatCAMTool, Gerber): if isinstance(poly_buf, MultiPolygon): cp = [] for pp in poly_buf: - cp.append(paint_p(pp, tooldia=tool_dia)) + cp.append(paint_p(pp, tooldiameter=tool_dia)) else: - cp = paint_p(poly_buf, tooldia=tool_dia) + cp = paint_p(poly_buf, tooldiameter=tool_dia) if cp is not None: if isinstance(cp, list):