Skip to content

Commit

Permalink
fixing editing parcel (same problem as adding)
Browse files Browse the repository at this point in the history
  • Loading branch information
cchristelis committed Jun 19, 2014
1 parent cda918c commit cda1558
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,12 +517,15 @@ def run(self):
SQL_PARCELS["DELETE"],
(frm.getValues()[0]["parcel_id"],)
)
sql = ""
points = []
for i, beacon in enumerate(frm.getValues()[1]["sequence"]):
sql += self.db.queryPreview(
SQL_PARCELS["INSERT"],
(frm.getValues()[1]["parcel_id"], beacon, i)
)
points.append(
(frm.getValues()[1]["parcel_id"], beacon, i))
sql = self.db.queryPreview(
SQL_PARCELS["INSERT_GENERAL"],
data=points,
multi_data=True
)
self.db.query(sql)
for l in self.requiredLayers: l.layer.removeSelection()

Expand Down

0 comments on commit cda1558

Please sign in to comment.