From 0aba1309a2b1b10dddf97902dbc96774196e510a Mon Sep 17 00:00:00 2001 From: Hades Date: Wed, 13 Feb 2019 09:45:32 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-14103=20=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E8=AE=BE=E7=BD=AE=E5=B7=A6=E7=88=B6=E6=A0=BC?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=B6=88=E5=A4=B1=2010.0=20=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=20&=20REPORT-14558=20=E3=80=90=E5=9B=9E=E5=BD=92?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E3=80=91=E5=8D=95=E5=85=83=E6=A0=BC=E5=B1=9E?= =?UTF-8?q?=E6=80=A7--=E4=BF=AE=E6=94=B9=E8=87=AA=E5=8A=A8=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=B1=9E=E6=80=A7=EF=BC=8C=E6=8E=A7=E4=BB=B6=E4=BC=9A?= =?UTF-8?q?=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/CellWidgetPropertyPane.java | 4 ++++ .../cell/settingpane/AbstractCellAttrPane.java | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) 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 eac4c3e0d9..bb4b2650ee 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 @@ -111,6 +111,8 @@ public class CellWidgetPropertyPane extends BasicPane { if (finalCS.isSelectedOneCell(ePane)) { if (tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow()) == null) {//cellElement未加入到report中时要添加进去 tplEC.addCellElement(cellElement); + } else { + cellElement = tplEC.getTemplateCellElement(finalCS.getColumn(), finalCS.getRow()); } setCellWidget(cellWidget, cellElement); } else { @@ -141,6 +143,8 @@ public class CellWidgetPropertyPane extends BasicPane { if(finalCS.isSelectedOneCell(ePane)){ if(tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow())== null){//cellElement未加入到report中时要添加进去 tplEC.addCellElement(cellElement); + } else { + cellElement = tplEC.getTemplateCellElement(finalCS.getColumn(), finalCS.getRow()); } setCellWidget(cellWidget, cellElement); }else{ diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/AbstractCellAttrPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/AbstractCellAttrPane.java index bc8e5e86e6..83ef31eaa9 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/AbstractCellAttrPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/AbstractCellAttrPane.java @@ -4,6 +4,7 @@ import com.fr.design.mainframe.AbstractAttrPane; import com.fr.design.mainframe.ElementCasePane; import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.FloatSelection; +import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; @@ -44,8 +45,17 @@ public abstract class AbstractCellAttrPane extends AbstractAttrPane { * 分成两个方法的意义在于,这个面板如果是个对话框,那么可以传cellElement进来update, 方便重复使用面板 为了对话框做准备 */ public void updateBean() { - updateBean(this.cellElement); + if (elementCasePane == null) { + return; + } + cs = (CellSelection) elementCasePane.getSelection(); TemplateElementCase elementCase = elementCasePane.getEditingElementCase(); - elementCase.addCellElement(cellElement); + TemplateCellElement cellElement = elementCase.getTemplateCellElement(cs.getColumn(), cs.getRow()); + if (cellElement == null) { + cellElement = new DefaultTemplateCellElement(cs.getColumn(), cs.getRow()); + } + this.cellElement = cellElement; + elementCase.addCellElement(this.cellElement); + updateBean(this.cellElement); } } \ No newline at end of file