Skip to content

Commit 93b8be6

Browse files
committed
Fix menu command execution in TGraph
1 parent 15f1b73 commit 93b8be6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/hist2d/TGraphPainter.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,10 +1296,10 @@ class TGraphPainter extends ObjectPainter {
12961296
if ((method.fName == 'RemovePoint') || (method.fName == 'InsertPoint')) {
12971297
if (!canp || canp._readonly) return true; // ignore function
12981298

1299-
let hint = this.extractTooltip(pnt);
1299+
let pnt = isFunc(pmain?.getLastEventPos) ? pmain.getLastEventPos() : null,
1300+
hint = this.extractTooltip(pnt);
13001301

13011302
if (method.fName == 'InsertPoint') {
1302-
let pnt = isFunc(pmain.getLastEventPos) ? pmain.getLastEventPos() : null;
13031303
if (pnt) {
13041304
let funcs = pmain.getGrFuncs(this.options.second_x, this.options.second_y),
13051305
userx = funcs.revertAxis('x', pnt.x) ?? 0,

0 commit comments

Comments
 (0)