From d83b708f9b8660691e609a90539a8e32980d145e Mon Sep 17 00:00:00 2001 From: ldam <ldam@passcal.nmt.edu> Date: Mon, 4 Mar 2024 16:51:59 -0700 Subject: [PATCH] correct pref_order is the order of plotting_data1 --- .../multi_threaded_plotting_widget.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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 13d86b832..aa0309a28 100644 --- a/sohstationviewer/view/plotting/plotting_widget/multi_threaded_plotting_widget.py +++ b/sohstationviewer/view/plotting/plotting_widget/multi_threaded_plotting_widget.py @@ -1,6 +1,6 @@ # Define functions to call processor -from typing import Tuple, Union, Dict, List +from typing import Tuple, Union, Dict, List, Optional from PySide6 import QtCore @@ -33,8 +33,15 @@ class MultiThreadedPlottingWidget(PlottingWidget): def __init__(self, *args, **kwargs): PlottingWidget.__init__(self, *args, **kwargs) self.data_processors: List[PlottingChannelProcessor] = [] - # pref_order: order of channels to be plotted + # order of channels to be plotted self.pref_order: List[str] = [] + # object of data to be plotted + self.data_object: Optional[GeneralData] = None + # id of data set to be plotted + self.data_set_id: Union[str, Tuple[str, str]] = '' + self.start_tm: float = 0 + self.end_tm: float = 0 + # Only one data processor can run at a time, so it is not a big problem # self.thread_pool = QtCore.QThreadPool() @@ -127,7 +134,6 @@ class MultiThreadedPlottingWidget(PlottingWidget): chan_order, list(plotting_data.keys())) chan_order = remove_not_found_chans( chan_order, list(plotting_data.keys()), self.processing_log) - self.pref_order = chan_order not_plot_chans = [] for chan_id in chan_order: @@ -231,7 +237,7 @@ class MultiThreadedPlottingWidget(PlottingWidget): return chan_order1 = self.get_plotting_info(self.plotting_data1, True) chan_order2 = self.get_plotting_info(self.plotting_data2) - + self.pref_order = chan_order1 self.plotting_preset() self.create_plotting_channel_processors( -- GitLab