From 70dbba96aa47afc003f63ee16b9e7afe52ded47f Mon Sep 17 00:00:00 2001 From: kienle <kienle@passcal.nmt.edu> Date: Thu, 13 Apr 2023 10:01:23 -0600 Subject: [PATCH] Remove ruler text on ESC key pressed --- .../view/plotting/plotting_widget/plotting_widget.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py b/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py index 9bd5fd3d1..3596e2833 100755 --- a/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py +++ b/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py @@ -461,6 +461,11 @@ class PlottingWidget(QtWidgets.QScrollArea): for w in self.peer_plotting_widgets: w.set_rulers_invisible() w.zoom_marker1_shown = False + try: + self.ruler_text.remove() + self.ruler_text = None + except AttributeError: + pass w.draw() return super(PlottingWidget, self).keyPressEvent(event) -- GitLab