Skip to content

Commit

Permalink
Issue 480 - TableComboViewer: Dropdown not showing when detached
Browse files Browse the repository at this point in the history
  • Loading branch information
lcaron committed Feb 1, 2024
1 parent 8d87478 commit a907115
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

2 comments on commit a907115

@egouge
Copy link
Contributor

@egouge egouge commented on a907115 Mar 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point, would it be possible to remove the System.out.println added on line 695 in this commit?

System.out.println("Popup=" + popup.hashCode() + " shell=" + getShell().hashCode());

@laeubi
Copy link
Member

@laeubi laeubi commented on a907115 Mar 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just click the edit button on this file, remove the line and create a PR!

Please sign in to comment.