Skip to content

Commit

Permalink
Preserve palette if changed in draw options #307
Browse files Browse the repository at this point in the history
This options will be used to draw histogram again
  • Loading branch information
linev committed May 7, 2024
1 parent 099b6bb commit 479ad3b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/hist2d/THistPainter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ class THistDrawOptions {
d.check('USE_PAD_PALETTE');
d.check('USE_PAD_STATS');

if (d.check('PAL', true)) this.Palette = d.partAsInt();
if (d.check('PAL', true))
this.Palette = d.partAsInt();
// this is zooming of histo content
if (d.check('MINIMUM:', true)) {
this.ominimum = true;
Expand Down Expand Up @@ -522,6 +523,10 @@ class THistDrawOptions {
res += this.TextKind;
}
}

if (this.Palette && this.canHavePalette())
res += `PAL${this.Palette}`;

if (this.Same)
res += this.ForceStat ? 'SAMES' : 'SAME';
else if (is_main_hist && res) {
Expand Down

0 comments on commit 479ad3b

Please sign in to comment.