Commit 1f7a04ff authored by Flavio TARSETTI's avatar Flavio TARSETTI

[widgets][toolchaineditor] append new color connection for new dataset connection

parent 05cf694a
......@@ -160,6 +160,10 @@ class BasePin(QGraphicsObject):
"channel"
] = start.block_object.synchronized_channel
if end.block_object.synchronized_channel is None:
end.block_object.synchronized_channel = connection_settings[
"channel"
]
# Create the connection
connection_settings["from"] = start.block + "." + start.pin
connection_settings["to"] = end.block + "." + end.pin
......@@ -999,11 +1003,16 @@ class Toolchain(QWidget):
for block in self.blocks:
if block.name.find(init_name) > -1:
init_name_count += 1
block_item["name"] = init_name + "_" + str(init_name_count)
new_block_name = init_name + "_" + str(init_name_count)
block_item["name"] = new_block_name
self.web_representation["channel_colors"][new_block_name] = "#000000"
block = Block(block_type, self.block_config, self.connection_config)
block.load(self, block_item)
block.dataChanged.connect(self.dataChanged)
block.dataChanged.emit()
self.blocks.append(block)
self.scene.addItem(block)
......
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