# HG changeset patch
# User Edouard Tisserant <edouard.tisserant@gmail.com>
# Date 1733667986 -3600
# Node ID d876242447dacfa9429eb294eefabf2aba5da4b1
# Parent  f273ee8354112e5d7f3cb3e5428d04b07044e16a
IDE: fix exception when changing or resizing comments in FBD

diff -r f273ee835411 -r d876242447da editors/Viewer.py
--- a/editors/Viewer.py	Sun Dec 08 13:59:36 2024 +0100
+++ b/editors/Viewer.py	Sun Dec 08 15:26:26 2024 +0100
@@ -2538,8 +2538,8 @@
 
     def GetScaledSize(self, width, height):
         if self.Scaling is not None:
-            width = round(width / self.Scaling[0] + 0.4) * self.Scaling[0]
-            height = round(height / self.Scaling[1] + 0.4) * self.Scaling[1]
+            width = round((width / self.Scaling[0] + 0.4) * self.Scaling[0])
+            height = round((height / self.Scaling[1] + 0.4) * self.Scaling[1])
         return width, height
 
     def AddNewElement(self, element, bbox, wire=None, connector=None):