- in Geometry Editor - fixed the Explode tool to work on the result of adding Text geometry

- all the Geometry Editor plugins are moved inside another folder and the UI's are moved into their own class
This commit is contained in:
Marius Stanciu
2022-04-13 18:33:05 +03:00
committed by Marius
parent f60919f4c7
commit 804786c6c2
9 changed files with 912 additions and 855 deletions

View File

@@ -1141,7 +1141,11 @@ class FCExplode(FCShapeTool):
if geo.geom_type == 'MultiLineString':
lines = [line for line in geo.geoms]
elif geo.geom_type == 'MultiPolygon':
lines = []
for poly in geo.geoms:
lines.append(poly.exterior)
lines += list(poly.interiors)
elif geo.is_ring:
geo = Polygon(geo)
ext_coords = list(geo.exterior.coords)
@@ -3466,7 +3470,8 @@ class AppGeoEditor(QtCore.QObject):
geometry = self.active_tool.geometry
try:
for geo in geometry:
w_geo = geometry.geoms if isinstance(geometry, (MultiPolygon, MultiLineString)) else geometry
for geo in w_geo:
plot_elements += self.plot_shape(geometry=geo, color=color, linewidth=linewidth)
# Non-iterable
except TypeError: