From cda1558ed9221f22009c65f4bfa192c91b9a9870 Mon Sep 17 00:00:00 2001 From: Christian Christelis Date: Thu, 19 Jun 2014 15:13:41 +0200 Subject: [PATCH] fixing editing parcel (same problem as adding) --- plugin.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plugin.py b/plugin.py index f06e0fc..3fbf55d 100644 --- a/plugin.py +++ b/plugin.py @@ -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()