diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ce0bee4..7167bd27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ CHANGELOG for FlatCAM Evo beta ================================================= +9.05.2022 + +- fixed an issue in the Paint Plugin where some polygons are discarded in a Geometry object made out of an imported SVG + 6.05.2022 - minor changes to one of the custom widgets diff --git a/Utils/custom_titlebar.py b/Utils/custom_titlebar.py index 2fb71dcf..878ff742 100644 --- a/Utils/custom_titlebar.py +++ b/Utils/custom_titlebar.py @@ -115,10 +115,14 @@ class TitleBar(QWidget): self.pressing = True def mouseDoubleClickEvent(self, a0): - self.on_click_maximize() - super().mouseDoubleClickEvent(a0) + if a0.button() == Qt.MouseButton.LeftButton: + self.on_click_maximize() + # super().mouseDoubleClickEvent(a0) def mouseMoveEvent(self, event): + if self.pressing and not self.maximaze: + self.on_click_maximize() + return if self.pressing: self.end = self.mapToGlobal(event.pos()) self.movement = self.end - self.start diff --git a/appEditors/geo_plugins/GeoPaintPlugin.py b/appEditors/geo_plugins/GeoPaintPlugin.py index a96c6f92..5e23178b 100644 --- a/appEditors/geo_plugins/GeoPaintPlugin.py +++ b/appEditors/geo_plugins/GeoPaintPlugin.py @@ -158,7 +158,7 @@ class PaintOptionsTool(AppTool): # If iterable, expand recursively. try: for geo_el in geometry: - if geo_el is not None: + if geo_el is not None and not geo_el.is_emoty: recurse(geometry=geo_el, reset=False) # Not iterable, do the actual indexing and add. diff --git a/appPlugins/ToolPaint.py b/appPlugins/ToolPaint.py index caf3acbd..d87fd415 100644 --- a/appPlugins/ToolPaint.py +++ b/appPlugins/ToolPaint.py @@ -2438,9 +2438,8 @@ class ToolPaint(AppTool, Gerber): # ## If iterable, expand recursively. try: for geo in geometry: - if geo and not geo.is_empty and geo.is_valid: + if geo and not geo.is_empty: recurse(geometry=geo, reset=False) - # ## Not iterable, do the actual indexing and add. except TypeError: if isinstance(geometry, LinearRing): @@ -2519,7 +2518,7 @@ class ToolPaint(AppTool, Gerber): try: multigeo = geometry.geoms if isinstance(geometry, (MultiPolygon, MultiLineString)) else geometry for geo in multigeo: - if geo and not geo.is_empty and geo.is_valid: + if geo and not geo.is_empty: recurse(geometry=geo, reset=False) # ## Not iterable, do the actual indexing and add. except TypeError: diff --git a/camlib.py b/camlib.py index d7963710..f1835f7f 100644 --- a/camlib.py +++ b/camlib.py @@ -1260,7 +1260,8 @@ class Geometry(object): geos = geos_polys try: - for ml in merged_lines: + w_geo = merged_lines.geoms if isinstance(merged_lines, (MultiPolygon, MultiLineString)) else merged_lines + for ml in w_geo: geos.append(ml) except TypeError: geos.append(merged_lines)