Don't try to show xhair if no active plot

symbol_search
Tyler Goodlet 2021-05-20 16:10:42 -04:00
parent 307afb1935
commit 212882a5a5
2 changed files with 7 additions and 1 deletions

View File

@ -172,6 +172,7 @@ class ChartSpace(QtGui.QWidget):
# XXX: pretty sure we don't need this
# remove any existing plots?
# XXX: ahh we might want to support cache unloading..
# self.vbox.removeWidget(self.linkedcharts)
# switching to a new viewable chart

View File

@ -435,7 +435,12 @@ class Cursor(pg.GraphicsObject):
self,
y_label_level: float = None,
) -> None:
g = self.graphics[self.active_plot]
plot = self.active_plot
if not plot:
return
g = self.graphics[plot]
# show horiz line and y-label
g['hl'].show()
g['vl'].show()