From b730f6c2b186cce15903d05050cba3434ca69e6d Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 12 Jul 2019 12:10:16 +0200 Subject: [PATCH] Fix dragging canvas box by its icon Signed-off-by: falkTX --- source/frontend/patchcanvas/scene.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/frontend/patchcanvas/scene.py b/source/frontend/patchcanvas/scene.py index 938b9b4b7..658e3ad74 100644 --- a/source/frontend/patchcanvas/scene.py +++ b/source/frontend/patchcanvas/scene.py @@ -31,6 +31,7 @@ from PyQt5.QtWidgets import QGraphicsRectItem, QGraphicsScene from . import ( canvas, CanvasBoxType, + CanvasIconType, CanvasPortType, CanvasLineType, CanvasBezierLineType, @@ -295,7 +296,9 @@ class PatchScene(QGraphicsScene): if self.m_mouse_down_init: self.m_mouse_down_init = False topmost = self.itemAt(event.scenePos(), self.m_view.transform()) - self.m_mouse_rubberband = not (topmost and topmost.type() in [CanvasBoxType, CanvasPortType]) + self.m_mouse_rubberband = not (topmost and topmost.type() in [CanvasBoxType, + CanvasIconType, + CanvasPortType]) if self.m_mouse_rubberband: event.accept()