Skip to content

Commit 12a3edb

Browse files
committed
Fix - correctly redraw histogram when project option changes
1 parent adaf987 commit 12a3edb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/hist2d/TH2Painter.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,8 +746,12 @@ class TH2Painter extends THistPainter {
746746
menu.addDrawMenu('Draw with', opts, arg => {
747747
if (arg.indexOf(kInspect) === 0)
748748
return this.showInspector(arg);
749+
const oldProject = this.options.Project;
749750
this.decodeOptions(arg);
750-
this.interactiveRedraw('pad', 'drawopt');
751+
if (oldProject === this.options.Project)
752+
this.interactiveRedraw('pad', 'drawopt');
753+
else
754+
this.toggleProjection(this.options.Project);
751755
});
752756

753757
if (this.options.Color || this.options.Contour || this.options.Hist || this.options.Surf || this.options.Lego === 12 || this.options.Lego === 14)

0 commit comments

Comments
 (0)