Fixed bug when pasting element with an odd width or height
authorLaurent Bessard
Wed, 16 Oct 2013 11:36:22 +0200
changeset 1367 324767a092dc
parent 1366 3756ae754713
child 1368 e567e4bee11f
Fixed bug when pasting element with an odd width or height
PLCControler.py
--- a/PLCControler.py	Mon Oct 14 14:59:15 2013 +0200
+++ b/PLCControler.py	Wed Oct 16 11:36:22 2013 +0200
@@ -2386,7 +2386,7 @@
                            max(miny, round(new_pos[1] / scaling[1]) * scaling[1]))
             else:
                 new_pos = (max(30, new_pos[0]), max(30, new_pos[1]))
-            diff = (new_pos[0] - x, new_pos[1] - y)
+            diff = (int(new_pos[0] - x), int(new_pos[1] - y))
             
             connections = {}
             for instance in instances: