Commit 1c0239b3 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Merge branch '267_toolchain_additional_unwanted_channel_color' into 'master'

Remove unwanted additional channel color on toolchain edition/creation

Closes #267

See merge request !139
parents 9e1b887e 5756969f
Pipeline #40625 passed with stages
in 11 minutes and 14 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