From da8b418207108a4605775f8412a7d823a49cdfed Mon Sep 17 00:00:00 2001 From: Tomas Zigo <50632337+tmszi@users.noreply.github.com> Date: Tue, 19 Sep 2023 05:45:05 +0200 Subject: [PATCH] wxGUI/psmap: fix simple point graphic recalculate position (#3164) Rectangle widget with integer coordinates Offset() method dx, dy parameters require integer argument type. --- gui/wxpython/psmap/frame.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/wxpython/psmap/frame.py b/gui/wxpython/psmap/frame.py index b31b154d924..6545fad5091 100644 --- a/gui/wxpython/psmap/frame.py +++ b/gui/wxpython/psmap/frame.py @@ -2133,8 +2133,8 @@ def RecalculatePosition(self, ids): rect=rect, canvasToPaper=True ) rect.Offset( - dx=rect.GetWidth() / 2, - dy=rect.GetHeight() / 2, + dx=int(rect.GetWidth() / 2), + dy=int(rect.GetHeight() / 2), ) self.instruction[id]["where"] = self.CanvasPaperCoordinates( rect=rect, canvasToPaper=True