Browse Source

Fix dragging canvas box by its icon

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.1-rc1
falkTX 6 years ago
parent
commit
b730f6c2b1
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      source/frontend/patchcanvas/scene.py

+ 4
- 1
source/frontend/patchcanvas/scene.py View File

@@ -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()


Loading…
Cancel
Save