From 9c5a1e72f5d3a95d03917d3bba4c4545604e93c3 Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 4 Jan 2022 12:44:38 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-65365=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E8=BE=B9=E6=A1=86=E3=80=91=E5=A4=9A=E6=AC=A1=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E6=A0=B7=E5=BC=8F=E5=90=8E=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E8=87=AA=E5=AE=9A=E4=B9=89=EF=BC=8C=E8=BE=B9=E6=A1=86?= =?UTF-8?q?=E7=BA=BF=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 根据数据模型填充面板时,需要先重置面板清理掉旧的数据 【改动思路】 同上 --- .../java/com/fr/design/gui/style/BorderPane.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java b/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java index dcead1c878..3c917ea456 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java @@ -4,7 +4,6 @@ package com.fr.design.gui.style; * Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved. */ -import com.fr.base.BaseUtils; import com.fr.base.CellBorderStyle; import com.fr.base.Style; import com.fr.design.constants.LayoutConstants; @@ -17,8 +16,8 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.style.color.NewColorSelectBox; -import com.fr.general.IOUtils; import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils; +import com.fr.general.IOUtils; import com.fr.stable.Constants; import com.fr.stable.CoreConstants; @@ -206,6 +205,8 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse } public void populateLineStyleAndColor(CellBorderStyle cellBorderStyle, boolean onlyInspectTop) { + resetLineStyleAndColorSetting(); + if (cellBorderStyle.getTopStyle() != Constants.LINE_NONE) { this.currentLineCombo.setSelectedLineStyle(cellBorderStyle.getTopStyle()); this.currentLineColorPane.setSelectObject(cellBorderStyle.getTopColor()); @@ -225,9 +226,6 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse } else if (cellBorderStyle.getHorizontalStyle() != Constants.LINE_NONE) { this.currentLineCombo.setSelectedLineStyle(cellBorderStyle.getHorizontalStyle()); this.currentLineColorPane.setSelectObject(cellBorderStyle.getHorizontalColor()); - } else { - this.currentLineCombo.setSelectedLineStyle(Constants.LINE_NONE); - this.currentLineColorPane.setSelectObject(Color.BLACK); } } @@ -236,6 +234,11 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse } } + private void resetLineStyleAndColorSetting() { + this.currentLineCombo.setSelectedLineStyle(Constants.LINE_NONE); + this.currentLineColorPane.setSelectObject(null); + } + @Override public Style update(Style style) {