Browse Source

Merge pull request #1220 in BA/design from ~PLOUGH/design:release/9.0 to release/9.0

* commit '17344f757d0d9987f60ea00fe97af6d5b9a96506':
  REPORT-3837 & REPORT-3805 [9.0一轮回归]无法添加条件属性;[9.0一轮回归]打开模板有时无法正常切换
master
superman 7 years ago
parent
commit
f25515ccaa
  1. 5
      designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java

5
designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java

@ -37,6 +37,9 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
//这边需要重新初始化columnNames, 否则nameList长度和columnNames长度不同导致出錯。 //这边需要重新初始化columnNames, 否则nameList长度和columnNames长度不同导致出錯。
if (tableDataComboBox.getSelectedItem() == null) {
return;
}
List<String> nameList = tableDataComboBox.getSelectedItem().calculateColumnNameList(); List<String> nameList = tableDataComboBox.getSelectedItem().calculateColumnNameList();
columnNames = new String[nameList.size()]; columnNames = new String[nameList.size()];
columnNames = tableDataComboBox.getSelectedItem().calculateColumnNameList().toArray(columnNames); columnNames = tableDataComboBox.getSelectedItem().calculateColumnNameList().toArray(columnNames);
@ -56,7 +59,7 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
@Override @Override
public SimpleDSColumn getValue() { public SimpleDSColumn getValue() {
if (this.tableDataComboBox.getSelectedItem() == null && this.columnNameComboBox.getSelectedItem() == null) { if (this.tableDataComboBox.getSelectedItem() == null || this.columnNameComboBox.getSelectedItem() == null) {
return null; return null;
} }
SimpleDSColumn dsColumn = new SimpleDSColumn(); SimpleDSColumn dsColumn = new SimpleDSColumn();

Loading…
Cancel
Save