Skip to content
Snippets Groups Projects
Commit c78976b6 authored by Lan Dam's avatar Lan Dam
Browse files

Merge branch 'i275_error_clicking_on_outside_plot_area' into 'develop'

reset tps_t after using to prevent bug when clicking on no point area

Closes #275

See merge request !316
parents 9e7b3f91 a153603a
No related branches found
No related tags found
1 merge request!316reset tps_t after using to prevent bug when clicking on no point area
Pipeline #3988 passed with stage
in 7 minutes and 19 seconds
......@@ -504,6 +504,9 @@ class PlottingWidget(QtWidgets.QScrollArea):
if self.tps_t is None:
return
xdata = self.tps_t
# Reset tps_t here because the reset in on_pick_event won't be
# reach when no point is clicked.
self.tps_t = None
else:
xdata = self.get_timestamp(event)
......
......@@ -69,7 +69,7 @@ class TimePowerSquaredWidget(plotting_widget.PlottingWidget):
tps_t: float - prompt's time on tps's chart to help rulers on other
plotting widgets to identify their location
"""
self.tps_t = 0
self.tps_t = None
"""
display_top_ticks: flag to display time ticks on top of ax or not
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment