Skip to content

Commit 473524e

Browse files
Added a fix for the object menu not displaying any options in desktop mode, even when a node is selected.
1 parent e0dad0b commit 473524e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

web/pgadmin/browser/static/js/MainMenuFactory.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ export default class MainMenuFactory {
7070
return new MenuItem({type: 'separator', label, priority});
7171
}
7272

73-
static refreshMainMenuItems(menu, menuItems) {
74-
menu.setMenuItems(menuItems);
75-
window.electronUI?.setMenus(MainMenuFactory.toElectron());
76-
pgAdmin.Browser.Events.trigger('pgadmin:refresh-menu-item', pgAdmin.Browser.MainMenus);
77-
}
78-
7973
static createMenuItem(options) {
8074
return new MenuItem({...options, callback: () => {
8175
// Some callbacks registered in 'callbacks' check and call specifiec callback function
@@ -128,6 +122,8 @@ export default class MainMenuFactory {
128122
// set the context menu as well
129123
pgAdmin.Browser.BrowserContextMenu = MainMenuFactory.getDynamicMenu('context', item, itemData, true);
130124

125+
window.electronUI?.setMenus(MainMenuFactory.toElectron());
126+
131127
pgAdmin.Browser.Events.trigger('pgadmin:refresh-app-menu');
132128
}
133129

0 commit comments

Comments
 (0)