beremiz

eab8030a510b
Parents 4fc7a6c05dab
Children 079099299603
IDE: fix exception when moving FBD elements with keyboard.
--- 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