diff --git a/sohstationviewer/view/plotting/waveform_dialog.py b/sohstationviewer/view/plotting/waveform_dialog.py index e32537fb3f3ad5bc62e357d122f542c16d0373df..19ff27ad7213d0c739c3fe67f83ac7eb493fdd62 100755 --- a/sohstationviewer/view/plotting/waveform_dialog.py +++ b/sohstationviewer/view/plotting/waveform_dialog.py @@ -51,19 +51,11 @@ class WaveformWidget(MultiThreadedPlottingWidget): plot_type = chan_db_info['plotType'] # refer to doc string for mass_pos_data to know the reason for 'ax_wf' - if 'ax_wf' not in c_data: - ax = getattr(self.plotting, plot_functions[plot_type][1])( - c_data, chan_db_info, chan_id, None, None) - if ax is None: - return - c_data['ax_wf'] = ax - ax.chan = chan_id - self.axes.append(ax) - else: - for artist in c_data['ax_wf'].lines + c_data['ax_wf'].collections: - artist.remove() - getattr(self.plotting, plot_functions[plot_type][1])( - c_data, chan_db_info, chan_id, c_data['ax_wf'], None) + ax = getattr(self.plotting, plot_functions[plot_type][1])( + c_data, chan_db_info, chan_id, None, None) + c_data['ax_wf'] = ax + ax.chan = chan_id + self.axes.append(ax) class WaveformDialog(QtWidgets.QWidget):