Skip to content

Commit a915b0f

Browse files
committed
Fix - disable "?" button when context menu is disabled
Fix issue #75
1 parent 4c09c75 commit a915b0f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/JSRootPainter.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3949,7 +3949,8 @@
39493949
painter.SetDivId(divid); // now add to painters list
39503950

39513951
painter.AddButton(JSROOT.ToolbarIcons.camera, "Create PNG", "CanvasSnapShot");
3952-
painter.AddButton(JSROOT.ToolbarIcons.question, "Access context menus", "PadContextMenus");
3952+
if (JSROOT.gStyle.ContextMenu)
3953+
painter.AddButton(JSROOT.ToolbarIcons.question, "Access context menus", "PadContextMenus");
39533954

39543955
if (can==null) {
39553956
if (opt.indexOf("noframe") < 0)
@@ -3977,7 +3978,8 @@
39773978

39783979
if (painter.MatchObjectType("TPad") && (!painter.has_canvas || painter.HasObjectsToDraw())) {
39793980
painter.AddButton(JSROOT.ToolbarIcons.camera, "Create PNG", "PadSnapShot");
3980-
painter.AddButton(JSROOT.ToolbarIcons.question, "Access context menus", "PadContextMenus");
3981+
if (JSROOT.gStyle.ContextMenu)
3982+
painter.AddButton(JSROOT.ToolbarIcons.question, "Access context menus", "PadContextMenus");
39813983
}
39823984

39833985
var prev_name = "";

0 commit comments

Comments
 (0)