Browse Source

REPORT-52087 单元格元素数据列中首次修改字符不会生效

bugfix/10.0
kuangshuai 4 years ago
parent
commit
5d19d70958
  1. 6
      designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java

6
designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java

@ -55,12 +55,14 @@ public abstract class LazyComboBox extends UIComboBox implements PopupMenuListen
@Override @Override
public void setSelectedItem(Object anObject) { public void setSelectedItem(Object anObject) {
initialSelected = anObject;
if (loaded) { if (loaded) {
super.setSelectedItem(anObject); super.setSelectedItem(anObject);
} else { } else {
this.setModel(new DefaultComboBoxModel<>(new Object[]{anObject})); if (initialSelected == null) {
this.setModel(new DefaultComboBoxModel<>(new Object[]{anObject}));
}
super.setSelectedItem(anObject); super.setSelectedItem(anObject);
initialSelected = anObject;
} }
} }

Loading…
Cancel
Save