From 3764a4ce48569bdf2f8a1319e45b7cd2aec13f64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Mon, 14 Feb 2022 10:19:05 +0800 Subject: [PATCH] =?UTF-8?q?CHART-22797=20=E4=BF=AE=E6=94=B9=E5=86=97?= =?UTF-8?q?=E4=BD=99=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=B0=86ChangeConfigPane?= =?UTF-8?q?=E9=87=8C=E9=9D=A2=E5=85=B3=E4=BA=8ESwitchTitle=E4=B8=BAnull?= =?UTF-8?q?=E7=9A=84=E5=86=97=E4=BD=99=E5=88=A4=E6=96=AD=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/chart/gui/ChangeConfigPane.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java index 043aa3df1..f053b09d6 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java @@ -23,6 +23,7 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.stable.StableUtils; +import com.fr.stable.StringUtils; import com.fr.van.chart.designer.TableLayout4VanChartHelper; import javax.swing.BorderFactory; @@ -238,18 +239,14 @@ public class ChangeConfigPane extends BasicBeanPane { private void populateSwitchTitlePane(int chartIndex, ChartCollection collection) { Chart chart = collection.getChart(chartIndex, Chart.class); Object switchTitle = chart.getSwitchTitle(); - String result; + String result = StringUtils.EMPTY; if (switchTitle != null) { if (switchTitle instanceof BaseFormula) { result = ((BaseFormula) switchTitle).getContent(); } else { result = Utils.objectToString(switchTitle); } - } else { - result = collection.getChartName(chartIndex); - chart.setSwitchTitle(result); } - TinyFormulaPane title = new TinyFormulaPane(); title.populateBean(result); switchTitles.add(title);