Browse Source

Workaround Qt bug

See 7976236bb3

Signed-off-by: falkTX <falktx@gmail.com>
tags/v1.9.14
falkTX 5 years ago
parent
commit
1dbcfa710c
Signed by: falkTX <falktx@gmail.com> GPG Key ID: 2D3445A829213837
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      source/frontend/patchcanvas.py

+ 6
- 4
source/frontend/patchcanvas.py View File

@@ -1719,7 +1719,8 @@ class CanvasBezierLine(QGraphicsPathItem):

class CanvasLineMov(QGraphicsLineItem):
def __init__(self, port_mode, port_type, parent):
QGraphicsLineItem.__init__(self, parent)
QGraphicsLineItem.__init__(self)
self.setParentItem(parent)

self.m_port_mode = port_mode
self.m_port_type = port_type
@@ -1727,7 +1728,7 @@ class CanvasLineMov(QGraphicsLineItem):
# Port position doesn't change while moving around line
self.p_lineX = self.scenePos().x()
self.p_lineY = self.scenePos().y()
self.p_width = self.parentItem().getPortWidth()
self.p_width = parent.getPortWidth()

if port_type == PORT_TYPE_AUDIO_JACK:
pen = QPen(canvas.theme.line_audio_jack, 2)
@@ -1772,7 +1773,8 @@ class CanvasLineMov(QGraphicsLineItem):

class CanvasBezierLineMov(QGraphicsPathItem):
def __init__(self, port_mode, port_type, parent):
QGraphicsPathItem.__init__(self, parent)
QGraphicsPathItem.__init__(self)
self.setParentItem(parent)

self.m_port_mode = port_mode
self.m_port_type = port_type
@@ -1780,7 +1782,7 @@ class CanvasBezierLineMov(QGraphicsPathItem):
# Port position doesn't change while moving around line
self.p_itemX = self.scenePos().x()
self.p_itemY = self.scenePos().y()
self.p_width = self.parentItem().getPortWidth()
self.p_width = parent.getPortWidth()

if port_type == PORT_TYPE_AUDIO_JACK:
pen = QPen(canvas.theme.line_audio_jack, 2)


Loading…
Cancel
Save