1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-05-04 05:44:23 +02:00

fix(crosshair): ignore fetching data and markers from invisible items

This commit is contained in:
2025-07-29 15:46:10 +02:00
committed by Jan Wyzula
parent b703b37bbd
commit 72b6f74252
+5 -2
View File
@@ -209,8 +209,11 @@ class Crosshair(QObject):
if self.highlighted_curve_index is not None and hasattr(self.plot_item, "visible_curves"):
# Focus on the highlighted curve only
self.items = [self.plot_item.visible_curves[self.highlighted_curve_index]]
else:
# Handle all curves
elif hasattr(self.plot_item, "visible_items"): # PlotBase general case
# Handle visible items in the plot item
self.items = self.plot_item.visible_items()
else: # Non PlotBase case
# Handle all items
self.items = self.plot_item.items
# Create or update markers