Browse Source

Workaround Qt bug

Signed-off-by: falkTX <falktx@gmail.com>
tags/v2.1-alpha2
falkTX 6 years ago
parent
commit
7976236bb3
Signed by: falkTX <falktx@gmail.com> GPG Key ID: 2D3445A829213837
2 changed files with 6 additions and 4 deletions
  1. +3
    -2
      source/frontend/patchcanvas/canvasbezierlinemov.py
  2. +3
    -2
      source/frontend/patchcanvas/canvaslinemov.py

+ 3
- 2
source/frontend/patchcanvas/canvasbezierlinemov.py View File

@@ -44,7 +44,8 @@ from . import (

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
@@ -52,7 +53,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)


+ 3
- 2
source/frontend/patchcanvas/canvaslinemov.py View File

@@ -44,7 +44,8 @@ from . import (

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
@@ -52,7 +53,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)


Loading…
Cancel
Save