Commit abedf038 authored by Flavio TARSETTI's avatar Flavio TARSETTI

[widgets][toolchaineditor] patch dataset/protocol load/update

parent b889cd60
......@@ -1090,7 +1090,15 @@ class Block(QGraphicsObject):
if ok:
if self.name != value["name"]:
old_name = self.name
self.name = value["name"]
if self.type == BlockType.DATASETS.name:
self.toolchain.web_representation["channel_colors"][
self.name
] = self.toolchain.web_representation["channel_colors"].pop(
old_name
)
block_updated = True
if (
self.synchronized_channel != value["channel"]
......@@ -1404,7 +1412,7 @@ class Toolchain(QWidget):
self.loop_button = QPushButton()
self.loop_button.setToolTip("Loop")
self.loop_button.setIcon(QIcon("beat/editor/widgets/dataset_icon.png"))
self.loop_button.setIcon(QIcon("beat/editor/widgets/loop_icon.png"))
self.loop_button.clicked.connect(self.add_loop_block)
self.dataset_button = QPushButton()
......@@ -1572,10 +1580,21 @@ class Toolchain(QWidget):
asset = Asset(self.prefix_path, AssetType.DATABASE, database_name)
for protocol in asset.declaration["protocols"]:
if protocol["name"] == name_split[2]:
for _set in protocol["sets"]:
if _set["name"] == name_split[3]:
for key in _set["outputs"].keys():
outputs.append(key)
if "sets" in protocol:
for _set in protocol["sets"]:
if _set["name"] == name_split[3]:
for key in _set["outputs"].keys():
outputs.append(key)
else:
protocol_name = protocol["template"]
sub_asset = Asset(
self.prefix_path, AssetType.PROTOCOLTEMPLATE, protocol_name
)
for _set in sub_asset.declaration["sets"]:
if _set["name"] == name_split[3]:
for key in _set["outputs"].keys():
outputs.append(key)
else:
if block_type == BlockType.ANALYZERS.name:
outputs = None
......
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