|
1 | 1 | import { gStyle, BIT, settings, constants, create, isObject, isFunc, isStr, getPromise, |
2 | 2 | clTList, clTPaveStats, clTPaletteAxis, clTProfile, clTProfile2D, clTProfile3D, clTPad, |
3 | | - clTAxis, clTF1, clTF2, kNoZoom, clTCutG, kNoStats, kTitle, setHistogramTitle } from '../core.mjs'; |
| 3 | + clTAxis, clTF1, clTF2, kNoZoom, clTCutG, kNoStats, kTitle, setHistogramTitle, addMethods } from '../core.mjs'; |
4 | 4 | import { getColorPalette } from '../base/colors.mjs'; |
5 | 5 | import { DrawOptions } from '../base/BasePainter.mjs'; |
6 | 6 | import { ObjectPainter, EAxisBits, kAxisTime, kAxisLabels } from '../base/ObjectPainter.mjs'; |
@@ -1852,6 +1852,12 @@ class THistPainter extends ObjectPainter { |
1852 | 1852 |
|
1853 | 1853 | if (!histo.fFunctions) |
1854 | 1854 | histo.fFunctions = create(clTList); |
| 1855 | + else if (histo.fFunctions._typename !== clTList) { |
| 1856 | + // Fix - seen once in jupyter notebook that typename was TList* |
| 1857 | + console.error(`Fixing wrong typename ${histo.fFunctions._typename} for histogram list of functions`); |
| 1858 | + histo.fFunctions._typename = clTList; |
| 1859 | + addMethods(histo.fFunctions, clTList); |
| 1860 | + } |
1855 | 1861 |
|
1856 | 1862 | if (asfirst) |
1857 | 1863 | histo.fFunctions.AddFirst(obj); |
|
0 commit comments