Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 480 - TableComboViewer: Dropdown not showing when detached #564

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading