Skip to content

Commit bd0214e

Browse files
committed
"Analysis parameters" tab: now shows html dataset representation
1 parent ba58689 commit bd0214e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

datalab/gui/panel/base.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,10 @@ def set_param_label(self, param: SignalObj | ImageObj):
139139
"""Set computing parameters label"""
140140
text = ""
141141
for key, value in param.metadata.items():
142-
if key.endswith("Param") and isinstance(value, str):
142+
if key.endswith("__param_html") and isinstance(value, str):
143143
if text:
144144
text += "<br><br>"
145-
lines = value.splitlines(False)
146-
lines[0] = f"<b>{lines[0]}</b>"
147-
text += "<br>".join(lines)
145+
text += value
148146
self.param_label.setText(text)
149147

150148
def update_properties_from(self, param: SignalObj | ImageObj | None = None):

datalab/gui/processor/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,8 @@ def compute_1_to_0(
10871087
# Add result shape to object's metadata
10881088
adapter.add_to(obj)
10891089
if param is not None:
1090-
obj.metadata[f"{adapter.name}Param"] = str(param)
1090+
obj.metadata[f"{adapter.name}__param_str"] = str(param)
1091+
obj.metadata[f"{adapter.name}__param_html"] = param.to_html()
10911092

10921093
# Append result to result data for later display
10931094
rdata.append(adapter, obj)

0 commit comments

Comments
 (0)