Browse Source

Merge pull request #250 in BA/design from ~ZPC/basic_design:dev to dev

* commit 'baa85099e643daaff8695c1fa058f208887fff6c':
  代码质量
  设计器bug, 条件属性那边选普通形态, 无法保存公式, 日期等格式.
  设计器bug, 条件属性那边选普通形态, 无法保存公式, 日期等格式
master
superman 8 years ago
parent
commit
1002dcc349
  1. 18
      designer/src/com/fr/design/condition/PresentHighlightPane.java

18
designer/src/com/fr/design/condition/PresentHighlightPane.java

@ -97,21 +97,21 @@ public class PresentHighlightPane extends ConditionAttrSingleConditionPane<Highl
} }
public void populate(HighlightAction ha) { public void populate(HighlightAction ha) {
present = ((PresentHighlightAction)ha).getPresent(); int valueIndex = ((PresentHighlightAction)ha).getValueIndex();
if (!(present instanceof NormalPresent)) { Object obj = ((PresentHighlightAction)ha).getValue();
presentComboBox.setSelectedIndex(1); presentComboBox.setSelectedIndex(valueIndex);
} else { if(null != obj) {
presentComboBox.setSelectedIndex(0); this.valueEditor.populate(obj);
valueEditor.populate(((NormalPresent)present).getNormalPresent());
} }
} }
public HighlightAction update() { public HighlightAction update() {
if (presentComboBox.getSelectedIndex() == 0) { Object value = this.valueEditor.update();
if (this.valueEditor.update() instanceof String) { if (presentComboBox.getSelectedIndex() == 1) {
if (value instanceof String) {
present = new NormalPresent(this.valueEditor.update()); present = new NormalPresent(this.valueEditor.update());
} }
} }
return new PresentHighlightAction(present); return new PresentHighlightAction(this.valueEditor.update());
} }
} }
Loading…
Cancel
Save