diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java index 59a58231ab..246bb72aa8 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java @@ -109,8 +109,11 @@ public class CellWidgetPropertyPane extends BasicPane { if (finalCS.isSelectedOneCell(ePane)) { if (tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow()) == null) {//cellElement未加入到report中时要添加进去 tplEC.addCellElement(cellElement); - } else if (tplEC.getTemplateCellElement(finalCS.getColumn(), finalCS.getRow()) != null) { - cellElement = tplEC.getTemplateCellElement(finalCS.getColumn(), finalCS.getRow()); + } else { + TemplateCellElement newCellElement = tplEC.getTemplateCellElement(finalCS.getColumn(), finalCS.getRow()); + if (newCellElement != null) { + cellElement = newCellElement; + } } setCellWidget(cellWidget, cellElement); } else {