From 2e5d636edc2d748f3a4056b2a27249d07beeb7db Mon Sep 17 00:00:00 2001 From: Yann Date: Wed, 4 Jan 2023 11:46:34 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-87576=20=E5=8F=96=E8=89=B2=E6=9D=BF?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=90=8E=E4=BC=9A=E8=AE=A9fr=E5=8D=A1?= =?UTF-8?q?=E4=BD=8F=E3=80=82=E5=8F=AF=E7=A8=B3=E5=AE=9A=E5=A4=8D=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/style/BorderPane.java | 41 +++++++++---------- 1 file changed, 19 insertions(+), 22 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 6d62593935..d2a302ea01 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 @@ -265,34 +265,31 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse int lineStyle = currentLineCombo.getSelectedLineStyle(); Color lineColor = currentLineColorPane.getSelectObject(); CellBorderStyle cellBorderStyle = new CellBorderStyle(); - if (topToggleButton.isSelected()) { - cellBorderStyle.setTopColor(lineColor); + if (lineColor != null) { + if (topToggleButton.isSelected()) { + cellBorderStyle.setTopColor(lineColor); + } + if (bottomToggleButton.isSelected()) { + cellBorderStyle.setBottomColor(lineColor); + } + if (leftToggleButton.isSelected()) { + cellBorderStyle.setLeftColor(lineColor); + } + if (rightToggleButton.isSelected()) { + cellBorderStyle.setRightColor(lineColor); + } + if (verticalToggleButton.isSelected()) { + cellBorderStyle.setVerticalColor(lineColor); + } + if (horizontalToggleButton.isSelected()) { + cellBorderStyle.setHorizontalColor(lineColor); + } } cellBorderStyle.setTopStyle(topToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); - - if (bottomToggleButton.isSelected()) { - cellBorderStyle.setBottomColor(lineColor); - } cellBorderStyle.setBottomStyle(bottomToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); - - if (leftToggleButton.isSelected()) { - cellBorderStyle.setLeftColor(lineColor); - } cellBorderStyle.setLeftStyle(leftToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); - - if (rightToggleButton.isSelected()) { - cellBorderStyle.setRightColor(lineColor); - } cellBorderStyle.setRightStyle(rightToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); - - if (verticalToggleButton.isSelected()) { - cellBorderStyle.setVerticalColor(lineColor); - } cellBorderStyle.setVerticalStyle(verticalToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); - - if (horizontalToggleButton.isSelected()) { - cellBorderStyle.setHorizontalColor(lineColor); - } cellBorderStyle.setHorizontalStyle(horizontalToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); outerToggleButton.setSelected(leftToggleButton.isSelected() && bottomToggleButton.isSelected() && rightToggleButton.isSelected() && topToggleButton.isSelected());