From a907115eee6b7d4de6008f5e72f5d744cef01b71 Mon Sep 17 00:00:00 2001 From: Laurent Caron Date: Thu, 1 Feb 2024 16:53:45 +0100 Subject: [PATCH] Issue 480 - TableComboViewer: Dropdown not showing when detached --- .../org/eclipse/nebula/widgets/tablecombo/TableCombo.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/widgets/tablecombo/org.eclipse.nebula.widgets.tablecombo/src/org/eclipse/nebula/widgets/tablecombo/TableCombo.java b/widgets/tablecombo/org.eclipse.nebula.widgets.tablecombo/src/org/eclipse/nebula/widgets/tablecombo/TableCombo.java index 2d02634e6..bfa8ab754 100644 --- a/widgets/tablecombo/org.eclipse.nebula.widgets.tablecombo/src/org/eclipse/nebula/widgets/tablecombo/TableCombo.java +++ b/widgets/tablecombo/org.eclipse.nebula.widgets.tablecombo/src/org/eclipse/nebula/widgets/tablecombo/TableCombo.java @@ -692,6 +692,7 @@ public void copy() { void createPopup(final int selectionIndex) { // create shell and table popup = new Shell(getShell(), SWT.NO_TRIM | SWT.ON_TOP); + System.out.println("Popup=" + popup.hashCode() + " shell=" + getShell().hashCode()); // create table table = new Table(popup, SWT.SINGLE | SWT.FULL_SELECTION); @@ -1486,6 +1487,11 @@ public void getDefaultAction(final AccessibleControlEvent e) { * @return */ private boolean isDropped() { + if (!getShell().equals(popup.getParent())) { + // Can happen when a part is detached + recreatePopup(); + return false; + } return popup.getVisible(); }