IDE: fix exception when changing or resizing comments in FBD default tip
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Sun, 08 Dec 2024 15:26:26 +0100
changeset 4065 d876242447da
parent 4064 f273ee835411
IDE: fix exception when changing or resizing comments in FBD
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):