From 388fbfa84735f95060ac713c5843d5e14484aa90 Mon Sep 17 00:00:00 2001 From: Nikita Zlobin Date: Sun, 3 Jun 2018 02:02:41 +0500 Subject: [PATCH] Rubberband alignment to pixels --- source/patchcanvas.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/patchcanvas.py b/source/patchcanvas.py index f57235861..e20a2e7e6 100644 --- a/source/patchcanvas.py +++ b/source/patchcanvas.py @@ -1401,7 +1401,8 @@ class PatchScene(QGraphicsScene): else: y = pos.y() - self.m_rubberband.setRect(x, y, abs(pos.x() - self.m_rubberband_orig_point.x()), abs(pos.y() - self.m_rubberband_orig_point.y())) + lineHinting = canvas.theme.rubberband_pen.widthF() / 2 + self.m_rubberband.setRect(x+lineHinting, y+lineHinting, abs(pos.x() - self.m_rubberband_orig_point.x()), abs(pos.y() - self.m_rubberband_orig_point.y())) return event.accept() if self.m_mid_button_down and self.m_ctrl_down: