Skip to content

Commit dbcc6ea

Browse files
committed
Fix - when change global tooltips settings, also change for each sub-pad
1 parent e82a887 commit dbcc6ea

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
1. Fix - prevent exception when discover HTML element position (#121)
55
2. Fix - prevent I/O failure when server automatically gzip response (#119)
66
3. Fix - lego drawing for stacked TH1 histograms
7+
4. Fix - when change global tooltips settings, also change for each sub-pad
78

89

910
## Changes in 5.0.2

scripts/JSRootPainter.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,7 +1972,7 @@
19721972
// Iterate over all known painters
19731973

19741974
// special case of the painter set as pointer of first child of main element
1975-
var painter = this.AccessTopPainter();;
1975+
var painter = this.AccessTopPainter();
19761976
if (painter) return userfunc(painter);
19771977

19781978
// iterate over all painters from pad list
@@ -4270,9 +4270,12 @@
42704270
else
42714271
menu.add("header: Canvas");
42724272

4273-
if (this.iscan)
4274-
menu.addchk((JSROOT.gStyle.Tooltip > 0), "Show tooltips", function() {
4273+
if (this.iscan || !this.has_canvas)
4274+
menu.addchk((JSROOT.gStyle.Tooltip > 0), "Enable tooltips (global)", function() {
42754275
JSROOT.gStyle.Tooltip = (JSROOT.gStyle.Tooltip === 0) ? 1 : -JSROOT.gStyle.Tooltip;
4276+
this.ForEachPainterInPad(function(fp) {
4277+
if (fp.tooltip_allowed!==undefined) fp.tooltip_allowed = (JSROOT.gStyle.Tooltip > 0);
4278+
});
42764279
});
42774280

42784281
if (!this._websocket) {

0 commit comments

Comments
 (0)