Skip to content

Commit

Permalink
Merge pull request #564 from eclipse/bugfix/Issue_480_TableComboViewe…
Browse files Browse the repository at this point in the history
…r_Dropdown_not_showing_when_detached_as_Eclipse_View

Issue 480 - TableComboViewer: Dropdown not showing when detached
  • Loading branch information
lcaron authored Feb 1, 2024
2 parents 8d87478 + a907115 commit 448b8a4
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
}

Expand Down

0 comments on commit 448b8a4

Please sign in to comment.