Commit 9ab47bf7 authored by Valentin Valls's avatar Valentin Valls
Browse files

Make sure the curve tooltip is working with many scans

parent c68ba64c
......@@ -825,6 +825,7 @@ class CurvePlotWidget(plot_helper.PlotWidget):
style = item.getStyle(scan)
curveItem = plot_helper.FlintCurve()
curveItem.setData(x=xx, y=yy, copy=False)
......@@ -481,6 +481,8 @@ class FlintItemMixIn:
def _getColoredSymbol(self, flintModel, scan: scan_model.Scan):
"""Returns a colored HTML char according to the expected plot item style
if scan is None:
scan = self.__scan
plotItem = self.customItem()
if plotItem is not None:
style = plotItem.getStyle(scan)
......@@ -560,7 +562,7 @@ class FlintCurve(Curve, FlintItemMixIn):
xName = "X"
yName = "Y"
char = self._getColoredSymbol(flintModel, scan)
char = self._getColoredSymbol(flintModel, None)
text = f"""
<li style="white-space:pre">{char} <b>{yName}:</b> {yValue} (index {index})</li>
Supports Markdown
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