Don't try to show xhair if no active plot
parent
307afb1935
commit
212882a5a5
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue