mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 09:15:38 +02:00
Fix missing context menu if Terminal is created while invisible
This commit is contained in:
parent
34bddccabe
commit
e58c5d3506
1 changed files with 8 additions and 2 deletions
|
@ -175,6 +175,11 @@ public class TabFolderMenuHandler extends PlatformObject {
|
||||||
|
|
||||||
// Create the context menu
|
// Create the context menu
|
||||||
contextMenu = contextMenuManager.createContextMenu(tabFolder);
|
contextMenu = contextMenuManager.createContextMenu(tabFolder);
|
||||||
|
// Temporarily set the menu on the tab folder to avoid the case
|
||||||
|
// where the menu has a different parent shell than the control.
|
||||||
|
// This can be the case if the tab folder is re-parented to the
|
||||||
|
// "PartRenderingEngine's limbo".
|
||||||
|
tabFolder.setMenu(contextMenu);
|
||||||
|
|
||||||
// Create the context menu action instances
|
// Create the context menu action instances
|
||||||
doCreateContextMenuActions();
|
doCreateContextMenuActions();
|
||||||
|
@ -375,10 +380,11 @@ public class TabFolderMenuHandler extends PlatformObject {
|
||||||
if (MenuManager.class.isAssignableFrom(adapter)) {
|
if (MenuManager.class.isAssignableFrom(adapter)) {
|
||||||
return contextMenuManager;
|
return contextMenuManager;
|
||||||
} else if (Menu.class.isAssignableFrom(adapter)) {
|
} else if (Menu.class.isAssignableFrom(adapter)) {
|
||||||
if (contextMenu != null && contextMenu.isDisposed()) {
|
if (contextMenu == null || contextMenu.isDisposed()) {
|
||||||
// menu got disposed (should not happen)
|
|
||||||
contextMenu = contextMenuManager.createContextMenu(getTabFolder());
|
contextMenu = contextMenuManager.createContextMenu(getTabFolder());
|
||||||
}
|
}
|
||||||
|
// Clear the menu from the tab folder now - see initialize()
|
||||||
|
getTabFolder().setMenu(null);
|
||||||
return contextMenu;
|
return contextMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue