plot_xy_hist: refactor data_changed

pull/2137/head
Simon Renblad 2023-07-12 12:05:16 +08:00 committed by Sébastien Bourdeauducq
parent c17f69a51b
commit 6c588b83d7
1 changed files with 4 additions and 4 deletions

View File

@ -124,11 +124,11 @@ class XYHistPlot(QtWidgets.QSplitter):
return False
return True
def data_changed(self, data, mods):
def data_changed(self, value, metadata, persist, mods):
try:
xs = data[self.args.xs][1]
histogram_bins = data[self.args.histogram_bins][1]
histograms_counts = data[self.args.histograms_counts][1]
xs = value[self.args.xs]
histogram_bins = value[self.args.histogram_bins]
histograms_counts = value[self.args.histograms_counts]
except KeyError:
return
if len(xs) != histograms_counts.shape[0]: