Browse Source

设计器bug, 条件属性那边选普通形态, 无法保存公式, 日期等格式

原先保存的时候入参根本没赋值(字符串的时候赋值了),其他情况传入的是null,保存后xml也没有内容。
master
zpc 8 years ago
parent
commit
9f23ca4a3f
  1. 12
      designer/src/com/fr/design/condition/PresentHighlightPane.java

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

@ -98,20 +98,22 @@ public class PresentHighlightPane extends ConditionAttrSingleConditionPane<Highl
public void populate(HighlightAction ha) { public void populate(HighlightAction ha) {
present = ((PresentHighlightAction)ha).getPresent(); present = ((PresentHighlightAction)ha).getPresent();
if (!(present instanceof NormalPresent)) { Object obj = ((PresentHighlightAction)ha).getValue();
if (!(present instanceof NormalPresent) && null == obj) {
presentComboBox.setSelectedIndex(1); presentComboBox.setSelectedIndex(1);
} else { } else {
presentComboBox.setSelectedIndex(0); presentComboBox.setSelectedIndex(0);
valueEditor.populate(((NormalPresent)present).getNormalPresent()); this.valueEditor.populate(obj);
} }
} }
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