提交 f3c25d42 编写于 作者: S serge-rider

#765 Image combo fix (update saved size only on manual resize)

上级 8a67ff33
......@@ -1002,14 +1002,14 @@ public class CImageCombo extends Composite {
}
if (!drop) {
this.popup.setVisible(false);
this.sizeHint = this.popup.getSize();
if (!isDisposed() && this.arrow.isFocusControl()) {
this.comboComposite.setFocus();
}
return;
}
if (getShell() != this.popup.getParent()) {
boolean newPopup = getShell() != this.popup.getParent();
if (newPopup) {
int selectionIndex = this.table.getSelectionIndex();
this.table.removeListener(SWT.Dispose, this.listener);
createPopup(selectionIndex);
......@@ -1059,6 +1059,15 @@ public class CImageCombo extends Composite {
column.setWidth(maxSize);
}
}
if (this.popup.getData("resizeListener") == null) {
this.popup.addListener(SWT.Resize, new Listener() {
@Override
public void handleEvent(Event event) {
CImageCombo.this.sizeHint = popup.getSize();
}
});
this.popup.setData("resizeListener", Boolean.TRUE);
}
this.popup.setVisible(true);
this.table.setFocus();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册