From bf63fbf211ca9054e06f5acb2257609951e5929a Mon Sep 17 00:00:00 2001 From: Yyming Date: Mon, 28 Dec 2020 15:22:53 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-45880=20=E4=BD=BF=E7=94=A8=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=81=A2=E5=A4=8D=E6=99=AE=E9=80=9A=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=90=8E=E6=96=87=E6=9C=AC=E6=A0=BC=E5=BC=8F=E5=A4=B1?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/grid/selection/CellSelection.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java index 4c90be3c5a..30d7e20783 100644 --- a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java +++ b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java @@ -573,6 +573,11 @@ public class CellSelection extends Selection { for (int i = 0; i < removeElementList.size(); i++) { CellElement element = removeElementList.get(i); element.setValue(null); + CellGUIAttr cellGUIAttr = element.getCellGUIAttr(); + cellGUIAttr.setShowAsDefault(true); + cellGUIAttr.setShowAsHTML(false); + cellGUIAttr.setShowAsDownload(false); + cellGUIAttr.setShowAsImage(false); } break; From b7051b4470167277a4907a362b876e36059b59ec Mon Sep 17 00:00:00 2001 From: Yyming Date: Mon, 28 Dec 2020 16:10:31 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-45880=20=E4=BD=BF=E7=94=A8=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=81=A2=E5=A4=8D=E6=99=AE=E9=80=9A=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=90=8E=E6=96=87=E6=9C=AC=E6=A0=BC=E5=BC=8F=E5=A4=B1?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/grid/selection/CellSelection.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java index 30d7e20783..da8788bb93 100644 --- a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java +++ b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java @@ -573,11 +573,7 @@ public class CellSelection extends Selection { for (int i = 0; i < removeElementList.size(); i++) { CellElement element = removeElementList.get(i); element.setValue(null); - CellGUIAttr cellGUIAttr = element.getCellGUIAttr(); - cellGUIAttr.setShowAsDefault(true); - cellGUIAttr.setShowAsHTML(false); - cellGUIAttr.setShowAsDownload(false); - cellGUIAttr.setShowAsImage(false); + setDefault(element); } break; @@ -593,6 +589,15 @@ public class CellSelection extends Selection { return true; } + //设置显示内容为default + private void setDefault(CellElement element) { + CellGUIAttr cellGUIAttr = element.getCellGUIAttr(); + cellGUIAttr.setShowAsDefault(true); + cellGUIAttr.setShowAsHTML(false); + cellGUIAttr.setShowAsDownload(false); + cellGUIAttr.setShowAsImage(false); + } + @Override public int[] getSelectedColumns() { From 9175e0258dd7e4a5f1e587dedd4e63f4212dbb61 Mon Sep 17 00:00:00 2001 From: Yyming Date: Mon, 28 Dec 2020 17:38:12 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-45880=20=E4=BD=BF=E7=94=A8=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=81=A2=E5=A4=8D=E6=99=AE=E9=80=9A=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=90=8E=E6=96=87=E6=9C=AC=E6=A0=BC=E5=BC=8F=E5=A4=B1?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/grid/selection/CellSelection.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java index da8788bb93..7f5d86ef1f 100644 --- a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java +++ b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java @@ -592,10 +592,12 @@ public class CellSelection extends Selection { //设置显示内容为default private void setDefault(CellElement element) { CellGUIAttr cellGUIAttr = element.getCellGUIAttr(); - cellGUIAttr.setShowAsDefault(true); - cellGUIAttr.setShowAsHTML(false); - cellGUIAttr.setShowAsDownload(false); - cellGUIAttr.setShowAsImage(false); + if (cellGUIAttr != null) { + cellGUIAttr.setShowAsDefault(true); + cellGUIAttr.setShowAsHTML(false); + cellGUIAttr.setShowAsDownload(false); + cellGUIAttr.setShowAsImage(false); + } }