diff --git a/095a7a6848.patch b/095a7a6848.patch new file mode 100644 index 0000000..75c85ea --- /dev/null +++ b/095a7a6848.patch @@ -0,0 +1,25 @@ +From 095a7a68482d2fc984f7f8dae1ce67d429e8aff6 Mon Sep 17 00:00:00 2001 +From: Ghostkeeper +Date: Fri, 30 Oct 2020 17:52:39 +0100 +Subject: [PATCH] Round coordinates before creating QPoint + +QPoint only accepts integers. Maybe we'd need QPointF but honestly we probably want to render this just pixel-aligned anyway. + +Contributes to issue CURA-7501. +--- + UM/Qt/Bindings/PointingRectangle.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/UM/Qt/Bindings/PointingRectangle.py b/UM/Qt/Bindings/PointingRectangle.py +index a0a79c6a1..64430a632 100644 +--- a/UM/Qt/Bindings/PointingRectangle.py ++++ b/UM/Qt/Bindings/PointingRectangle.py +@@ -103,7 +103,7 @@ def updatePaintNode(self, paint_node, update_data): + vertex_data[5].set(0, 0) + vertex_data[6].set(0, 0) + +- target_offset = self._target - QPoint(self.x(), self.y()) ++ target_offset = self._target - QPoint(round(self.x()), round(self.y())) + + arrow_on_side = -1 # no arrow + arrow_size = 0 diff --git a/python-uranium.spec b/python-uranium.spec index f006c3a..061ac20 100644 --- a/python-uranium.spec +++ b/python-uranium.spec @@ -1,11 +1,15 @@ Name: python-uranium Version: 4.7.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A Python framework for building desktop applications License: LGPLv3+ URL: https://github.com/Ultimaker/Uranium Source0: %{url}/archive/%{version}.tar.gz#/Uranium-%{version}.tar.gz +# Round coordinates before creating QPoint +# QPoint(self.x(), self.y()): argument 1 has unexpected type 'float' +Patch1: %{url}/commit/095a7a6848.patch + BuildRequires: python3-devel BuildRequires: python3-pip BuildRequires: /usr/bin/doxygen @@ -109,6 +113,10 @@ popd %changelog +* Fri Nov 27 2020 Miro Hrončok - 4.7.1-2 +- Round coordinates before creating QPoint +- Fixes a test failure with Python 3.10 + * Thu Sep 03 2020 Miro Hrončok - 4.7.1-1 - Update to 4.7.1