IDE: fix exception when moving FBD elements with keyboard.
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Wed, 27 Nov 2024 19:48:12 +0100
changeset 4053 eab8030a510b
parent 4052 4fc7a6c05dab
child 4054 079099299603
IDE: fix exception when moving FBD elements with keyboard.
editors/Viewer.py
--- a/editors/Viewer.py	Wed Nov 27 16:31:24 2024 +0100
+++ b/editors/Viewer.py	Wed Nov 27 19:48:12 2024 +0100
@@ -2474,8 +2474,8 @@
             elif not self.Debug and self.SelectedElement is not None:
                 movex, movey = move
                 if not event.AltDown() or event.ShiftDown():
-                    movex *= scaling[0]
-                    movey *= scaling[1]
+                    movex = int(movex * scaling[0])
+                    movey = int(movey * scaling[1])
                     if event.ShiftDown() and not event.AltDown():
                         movex *= 10
                         movey *= 10