# HG changeset patch
# User Edouard Tisserant <edouard.tisserant@gmail.com>
# Date 1732733292 -3600
# Node ID eab8030a510bfb0cb30de899ae7dfd7e039b9d26
# Parent  4fc7a6c05dab6384a610968ec15c9dd4379cea32
IDE: fix exception when moving FBD elements with keyboard.

diff -r 4fc7a6c05dab -r eab8030a510b 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