diff --git a/modules/hist2d/TGraphPainter.mjs b/modules/hist2d/TGraphPainter.mjs index 17b6c5e34..3139c75e4 100644 --- a/modules/hist2d/TGraphPainter.mjs +++ b/modules/hist2d/TGraphPainter.mjs @@ -1396,7 +1396,7 @@ class TGraphPainter extends ObjectPainter { return false; } - /** @summary Update object members + /** @summary Update TGraph object members * @private */ _updateMembers(graph, obj) { graph.fBits = obj.fBits; @@ -1423,6 +1423,8 @@ class TGraphPainter extends ObjectPainter { graph.fMarkerColor = obj.fMarkerColor; graph.fMarkerSize = obj.fMarkerSize; graph.fMarkerStyle = obj.fMarkerStyle; + + return obj.fFunctions; } /** @summary Update TGraph object */ @@ -1432,7 +1434,7 @@ class TGraphPainter extends ObjectPainter { if (opt && (opt !== this.options.original)) this.decodeOptions(opt); - this._updateMembers(this.getObject(), obj); + const new_funcs = this._updateMembers(this.getObject(), obj); this.createBins(); @@ -1448,7 +1450,7 @@ class TGraphPainter extends ObjectPainter { } } - this._funcHandler = new FunctionsHandler(this, this.getPadPainter(), obj.fFunctions); + this._funcHandler = new FunctionsHandler(this, this.getPadPainter(), new_funcs); return true; } diff --git a/modules/hist2d/TScatterPainter.mjs b/modules/hist2d/TScatterPainter.mjs index e1e72b395..24f1752ed 100644 --- a/modules/hist2d/TScatterPainter.mjs +++ b/modules/hist2d/TScatterPainter.mjs @@ -45,7 +45,8 @@ class TScatterPainter extends TGraphPainter { return pal; } - /** @summary Update TScatter members */ + /** @summary Update TScatter members + * @private */ _updateMembers(scatter, obj) { scatter.fBits = obj.fBits; scatter.fTitle = obj.fTitle; @@ -55,7 +56,7 @@ class TScatterPainter extends TGraphPainter { scatter.fMargin = obj.fMargin; scatter.fMinMarkerSize = obj.fMinMarkerSize; scatter.fMaxMarkerSize = obj.fMaxMarkerSize; - super._updateMembers(scatter.fGraph, obj.fGraph); + return super._updateMembers(scatter.fGraph, obj.fGraph); } /** @summary Return Z axis used for palette drawing