Skip to content

Commit

Permalink
context menu: Don't show items for hidden commands
Browse files Browse the repository at this point in the history
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I15f62cbdfc69d9ba4c1c7e53f2238d13b65285e5
  • Loading branch information
hfiguiere committed Dec 24, 2024
1 parent 3d3b189 commit cdc4523
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions browser/src/control/Control.ContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ L.Control.ContextMenu = L.Control.extend({
continue;
}

// If the command was hidden with the Hide_Command postmessage...
if (this._map.uiManager.hiddenCommands[item.command]) {
continue;
}

// reduce Paste Special submenu
if (item.type === 'menu' && item.text && item.text.replace('~', '') === 'Paste Special'
&& item.menu && item.menu.length) {
Expand Down

0 comments on commit cdc4523

Please sign in to comment.