Skip to content

Commit

Permalink
No context menu without pad
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Dec 4, 2024
1 parent 7d9ff5a commit ba1a7f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions build/jsroot.js
Original file line number Diff line number Diff line change
Expand Up @@ -70076,10 +70076,10 @@ class TPadPainter extends ObjectPainter {
/** @summary Fill pad context menu
* @private */
fillContextMenu(menu) {
if (this.pad)
menu.header(`${this.pad._typename}::${this.pad.fName}`, `${urlClassPrefix}${this.pad._typename}.html`);
else
menu.header('Canvas', `${urlClassPrefix}${clTCanvas}.html`);
if (!this.pad)
return false;

menu.header(`${this.pad._typename}::${this.pad.fName}`, `${urlClassPrefix}${this.pad._typename}.html`);

menu.addchk(this.isTooltipAllowed(), 'Show tooltips', () => this.setTooltipAllowed('toggle'));

Expand Down
8 changes: 4 additions & 4 deletions modules/gpad/TPadPainter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1272,10 +1272,10 @@ class TPadPainter extends ObjectPainter {
/** @summary Fill pad context menu
* @private */
fillContextMenu(menu) {
if (this.pad)
menu.header(`${this.pad._typename}::${this.pad.fName}`, `${urlClassPrefix}${this.pad._typename}.html`);
else
menu.header('Canvas', `${urlClassPrefix}${clTCanvas}.html`);
if (!this.pad)
return false;

menu.header(`${this.pad._typename}::${this.pad.fName}`, `${urlClassPrefix}${this.pad._typename}.html`);

menu.addchk(this.isTooltipAllowed(), 'Show tooltips', () => this.setTooltipAllowed('toggle'));

Expand Down

0 comments on commit ba1a7f2

Please sign in to comment.