From 0f10d81c59956eac11eb063fffc50fe29b391d54 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 13 Apr 2020 03:50:35 +0100 Subject: [PATCH] Use PORT_TYPE_PARAMETER for CV ports (brown color) Signed-off-by: falkTX --- source/frontend/carla_host.py | 4 ++-- source/frontend/patchcanvas/canvasbox.py | 6 ++++-- source/frontend/patchcanvas/patchcanvas.py | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/source/frontend/carla_host.py b/source/frontend/carla_host.py index 25365add2..bc207237b 100644 --- a/source/frontend/carla_host.py +++ b/source/frontend/carla_host.py @@ -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 diff --git a/source/frontend/patchcanvas/canvasbox.py b/source/frontend/patchcanvas/canvasbox.py index df866bbae..7e6f173cc 100644 --- a/source/frontend/patchcanvas/canvasbox.py +++ b/source/frontend/patchcanvas/canvasbox.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # PatchBay Canvas engine using QGraphicsView/Scene -# Copyright (C) 2010-2019 Filipe Coelho +# Copyright (C) 2010-2020 Filipe Coelho # # 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: diff --git a/source/frontend/patchcanvas/patchcanvas.py b/source/frontend/patchcanvas/patchcanvas.py index c530598f5..5a4837125 100644 --- a/source/frontend/patchcanvas/patchcanvas.py +++ b/source/frontend/patchcanvas/patchcanvas.py @@ -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]