Browse Source

Merge pull request #3758 in DESIGN/design from bugfix/10.0 to release/10.0

* commit 'f62572a2bdc76cd416b93e7f1fdf8b265e7fc72b':
  REPORT-49782 补充因代码冲突删去的SVG图标 【问题原因】补充因代码冲突删去的SVG图标 【改动思路】补充因代码冲突删去的SVG图标
  REPORT-48999 填报-填报属性设置-填报属性快捷设置远程设计修改无效
  REPORT-48324 聚合报表,超链在设计器中切换模板后显示不对
  REPORT-46723 填报智能添加单元格组 遗漏一个判断条件的同步修改
  REPORT-46723 填报智能添加单元格组
  CHART-18429 点类地图散点条件属性默认值
feature/big-screen
superman 4 years ago
parent
commit
99fd3eebd2
  1. 26
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

26
designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

@ -310,9 +310,9 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
// 单元格组要记录下之前的选中情况 // 单元格组要记录下之前的选中情况
private CellSelection oriCellSelection = null; private CellSelection oriCellSelection = null;
private List<String> newAdd = new ArrayList<String>(); private List<ColumnRow> newAdd = new ArrayList<>();
private List<String> oldAdd = new ArrayList<String>(); private List<ColumnRow> oldAdd = new ArrayList<>();
public SmartJTablePane4DB(KeyColumnTableModel model, ElementCasePane actionReportPane) { public SmartJTablePane4DB(KeyColumnTableModel model, ElementCasePane actionReportPane) {
this(model, actionReportPane, false); this(model, actionReportPane, false);
@ -433,7 +433,8 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
if (!allColumnRow.contains(columnRow.toString())) { if (!allColumnRow.contains(columnRow.toString())) {
add.addColumnRow(columnRow); add.addColumnRow(columnRow);
} }
// 重新更换区域框选单元格后 清理历史框选
oldAdd.clear();
} }
if (add.getSize() > 0) { if (add.getSize() > 0) {
@ -459,10 +460,11 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
TemplateCellElement cellElement = ePane.getEditingElementCase().getTemplateCellElement(c + i, r + j); TemplateCellElement cellElement = ePane.getEditingElementCase().getTemplateCellElement(c + i, r + j);
if (cellElement != null && ((i + c) != 0 || (r + j) != 0)) { if (cellElement != null && ((i + c) != 0 || (r + j) != 0)) {
String value = cellElement.toString(); String value = cellElement.toString();
if (!newAdd.contains(value) && !allColumnRow.contains(value)) { ColumnRow columnRow = ColumnRow.valueOf(value);
add.addColumnRow(ColumnRow.valueOf(value)); if (!newAdd.contains(columnRow) && !allColumnRow.contains(value)) {
add.addColumnRow(columnRow);
} }
newAdd.add(value); newAdd.add(columnRow);
} }
if (cellElement == null) { if (cellElement == null) {
@ -470,16 +472,14 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
if (!allColumnRow.contains(columnRow.toString())) { if (!allColumnRow.contains(columnRow.toString())) {
add.addColumnRow(columnRow); add.addColumnRow(columnRow);
} }
newAdd.add(columnRow.toString()); newAdd.add(columnRow);
} }
} }
} }
int oldSize = oldAdd.size(); // 计算出前后两次选中的差值
int newSize = newAdd.size(); oldAdd.removeAll(newAdd);
if (oldSize > newSize && oldAdd.containsAll(newAdd)) { // 移除差值部分
int diff = oldSize - newSize; newValue.removeAll(oldAdd);
newValue.splice(newValue.getSize() - diff, diff);
}
oldAdd.clear(); oldAdd.clear();
oldAdd.addAll(newAdd); oldAdd.addAll(newAdd);
} }

Loading…
Cancel
Save