- in Geometry Editor made sure that the MultiPolygon shapes (like those made by the Text Tool) will update the coordinates in the UI

This commit is contained in:
Marius Stanciu
2022-04-13 20:12:54 +03:00
committed by Marius
parent 804786c6c2
commit 716dddb851
2 changed files with 15 additions and 1 deletions

View File

@@ -2376,12 +2376,25 @@ class AppGeoEditor(QtCore.QObject):
coords = ''
vertex_nr = 0
for idx, line in enumerate(last_sel_geo):
for idx, line in enumerate(last_sel_geo.geoms):
line_coords = list(line.coords)
vertex_nr += len(line_coords)
coords += 'Line %s\n' % str(idx)
coords += str(line_coords) + '\n'
elif last_sel_geo.geom_type == 'MultiPolygon':
length = 0.0
self.is_simple_entry.set_value('None')
self.is_ring_entry.set_value('None')
self.is_ccw_entry.set_value('None')
coords = ''
vertex_nr = 0
for idx, poly in enumerate(last_sel_geo.geoms):
poly_coords = list(poly.exterior.coords) + [list(i.coords) for i in poly.interiors]
vertex_nr += len(poly_coords)
coords += 'Polygon %s\n' % str(idx)
coords += str(poly_coords) + '\n'
elif last_sel_geo.geom_type in ['LinearRing', 'LineString']:
length = last_sel_geo.length
coords = list(last_sel_geo.coords)