Commit 5756969f authored by Flavio TARSETTI's avatar Flavio TARSETTI Committed by Flavio TARSETTI
Browse files

[widgets][toolchaineditor] removed unwanted additional channel color

Fixes #267
parent 9e1b887e
Pipeline #40624 passed with stage
in 20 minutes and 39 seconds
......@@ -28,6 +28,7 @@ from functools import partial
import simplejson as json
from beat.backend.python.algorithm import Algorithm
from PyQt5.QtCore import QFile
from PyQt5.QtCore import QPointF
from PyQt5.QtCore import QRect
......@@ -63,8 +64,6 @@ from PyQt5.QtWidgets import QToolBar
from PyQt5.QtWidgets import QVBoxLayout
from PyQt5.QtWidgets import QWidget
from beat.backend.python.algorithm import Algorithm
from ..backend.asset import Asset
from ..backend.asset import AssetType
from ..backend.assetmodel import AssetModel
......@@ -398,11 +397,16 @@ class Connection(QGraphicsPathItem):
warning.exec_()
else:
if self.channel not in channel_colors:
toolchain.web_representation["channel_colors"][self.channel] = "#000000"
hexadecimal = "000000"
if self.channel != "":
if self.channel not in channel_colors:
toolchain.web_representation["channel_colors"][
self.channel
] = "#000000"
channel_colors = toolchain.web_representation["channel_colors"]
hexadecimal = channel_colors[self.channel].lstrip("#")
hexadecimal = channel_colors[self.channel].lstrip("#")
hlen = len(hexadecimal)
self.connection_color = list(
int(hexadecimal[i : i + hlen // 3], 16)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment