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);