diff --git a/sohstationviewer/view/plotting/plotting_widget/multi_threaded_plotting_widget.py b/sohstationviewer/view/plotting/plotting_widget/multi_threaded_plotting_widget.py index c7771a4dbd19342d0c8411e6229eb8c14f23b714..63dad07cfa8a1fdd376e46eb822068308d6b49d8 100644 --- a/sohstationviewer/view/plotting/plotting_widget/multi_threaded_plotting_widget.py +++ b/sohstationviewer/view/plotting/plotting_widget/multi_threaded_plotting_widget.py @@ -36,10 +36,6 @@ class MultiThreadedPlottingWidget(PlottingWidget): # self.thread_pool = QtCore.QThreadPool() - # Flag to indicate whether the data is being plotted for the first time - # or the plot is being zoomed in. - self.is_first_plotting = True - # Used to ensure that the user cannot read a new data set when we are # zooming in on the waveform plot. Also to prevent user to use ruler # or zoom_markers while plotting @@ -54,7 +50,6 @@ class MultiThreadedPlottingWidget(PlottingWidget): Reset the widget in order to plot a new data set. """ self.data_processors = [] - self.is_first_plotting = True self.is_working = False def init_plot(self, @@ -262,18 +257,12 @@ class MultiThreadedPlottingWidget(PlottingWidget): Display a finish message Reset all internal flags """ - if self.is_first_plotting: - self.done() - finished_msg = f'{self.name} plot finished' - else: - super().set_lim() - self.draw() - finished_msg = f'Zooming {self.name} is finished' + self.done() + finished_msg = f'{self.name} plot finished' display_tracking_info(self.tracking_box, finished_msg, LogType.INFO) self.is_working = False - self.is_first_plotting = False def done(self): """