Skip to content

Commit 35ffef2

Browse files
committed
Fix - prevent error when TPaveText includes TLine or TBox in list of
lines
1 parent 8a9191f commit 35ffef2

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
2. Fix in unzomming of log scale - https://root-forum.cern.ch/t/25889
66
3. Fix in TMultiGraph painting - ignore not-supported options https://root-forum.cern.ch/t/25888
77
4. Fix - correctly use fGridColor from TStyle
8+
5. Fix - prevent error when TPaveText includes TLine or TBox in list of lines
89

910

1011
## Changes in 5.2.2

scripts/JSRootCore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
}
9090
} (function(JSROOT) {
9191

92-
JSROOT.version = "5.2.x 14/08/2017";
92+
JSROOT.version = "5.2.x 21/08/2017";
9393

9494
JSROOT.source_dir = "";
9595
JSROOT.source_min = false;

scripts/JSRootPainter.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4016,15 +4016,18 @@
40164016
// adjust font size
40174017
for (var j = 0; j < nlines; ++j) {
40184018
var line = pt.fLines.arr[j].fTitle;
4019+
if (line === undefined) continue;
40194020
lines.push(line);
40204021
if (j>0) maxlen = Math.max(maxlen, line.length);
4021-
if (!this.IsStats() || (j == 0) || (line.indexOf('|') < 0)) continue;
4022-
if (first_stat === 0) first_stat = j;
4022+
if (!this.IsStats() || (lines.length == 1) || (line.indexOf('|') < 0)) continue;
4023+
if (first_stat === 0) first_stat = lines.length-1;
40234024
var parts = line.split("|");
40244025
if (parts.length > num_cols)
40254026
num_cols = parts.length;
40264027
}
40274028

4029+
nlines = lines.length;
4030+
40284031
if ((nlines===1) && !this.IsStats() &&
40294032
(lines[0].indexOf("#splitline{")===0) && (lines[0][lines[0].length-1]=="}")) {
40304033
var pos = lines[0].indexOf("}{");

0 commit comments

Comments
 (0)