Browse Source

Use PORT_TYPE_PARAMETER for CV ports (brown color)

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.1
falkTX 4 years ago
parent
commit
0f10d81c59
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 7 additions and 5 deletions
  1. +2
    -2
      source/frontend/carla_host.py
  2. +4
    -2
      source/frontend/patchcanvas/canvasbox.py
  3. +1
    -1
      source/frontend/patchcanvas/patchcanvas.py

+ 2
- 2
source/frontend/carla_host.py View File

@@ -1649,8 +1649,8 @@ class HostWindow(QMainWindow):
portType = patchcanvas.PORT_TYPE_AUDIO_JACK
isAlternate = False
elif portFlags & PATCHBAY_PORT_TYPE_CV:
portType = patchcanvas.PORT_TYPE_AUDIO_JACK
isAlternate = True
portType = patchcanvas.PORT_TYPE_PARAMETER
isAlternate = False
elif portFlags & PATCHBAY_PORT_TYPE_MIDI:
portType = patchcanvas.PORT_TYPE_MIDI_JACK
isAlternate = False


+ 4
- 2
source/frontend/patchcanvas/canvasbox.py View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# PatchBay Canvas engine using QGraphicsView/Scene
# Copyright (C) 2010-2019 Filipe Coelho <falktx@falktx.com>
# Copyright (C) 2010-2020 Filipe Coelho <falktx@falktx.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -316,7 +316,7 @@ class CanvasBox(QGraphicsItem):
port_spacing = canvas.theme.port_height + canvas.theme.port_spacing

# Get Max Box Width, vertical ports re-positioning
port_types = [PORT_TYPE_AUDIO_JACK, PORT_TYPE_MIDI_JACK, PORT_TYPE_MIDI_ALSA, PORT_TYPE_PARAMETER]
port_types = (PORT_TYPE_AUDIO_JACK, PORT_TYPE_MIDI_JACK, PORT_TYPE_MIDI_ALSA, PORT_TYPE_PARAMETER)
last_in_type = last_out_type = PORT_TYPE_NULL
last_in_pos = last_out_pos = canvas.theme.box_header_height + canvas.theme.box_header_spacing

@@ -403,6 +403,7 @@ class CanvasBox(QGraphicsItem):
PORT_TYPE_AUDIO_JACK: [],
PORT_TYPE_MIDI_JACK: [],
PORT_TYPE_MIDI_ALSA: [],
PORT_TYPE_PARAMETER: [],
}
for port in canvas.port_list:
if port.group_id != self.m_group_id:
@@ -426,6 +427,7 @@ class CanvasBox(QGraphicsItem):
PORT_TYPE_AUDIO_JACK: [],
PORT_TYPE_MIDI_JACK: [],
PORT_TYPE_MIDI_ALSA: [],
PORT_TYPE_PARAMETER: [],
}

for port in canvas.port_list:


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

@@ -104,7 +104,7 @@ class CanvasObject(QObject):
except:
return

for port_type in (PORT_TYPE_AUDIO_JACK, PORT_TYPE_MIDI_JACK, PORT_TYPE_MIDI_ALSA):
for port_type in (PORT_TYPE_AUDIO_JACK, PORT_TYPE_MIDI_JACK, PORT_TYPE_MIDI_ALSA, PORT_TYPE_PARAMETER):
source_ports = sources[port_type]
target_ports = targets[port_type]



Loading…
Cancel
Save