Browse Source

CHART-22936 图表切换控件标题设置公式无效

bugfix/11.0
方磊 3 years ago
parent
commit
94679a8333
  1. 14
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java

14
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java

@ -10,6 +10,7 @@ import com.fr.chart.base.AttrChangeConfig;
import com.fr.chart.base.AttrChangeType;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.SwitchTitle;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.foldablepane.UIExpandablePane;
@ -238,13 +239,14 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
private void populateSwitchTitlePane(int chartIndex, ChartCollection collection) {
Chart chart = collection.getChart(chartIndex, Chart.class);
Object switchTitle = chart.getSwitchTitle();
SwitchTitle switchTitle = chart.getSwitchTitle();
Object content = switchTitle.getContent();
String result = StringUtils.EMPTY;
if (switchTitle != null) {
if (switchTitle instanceof BaseFormula) {
result = ((BaseFormula) switchTitle).getContent();
if (content != null) {
if (content instanceof BaseFormula) {
result = ((BaseFormula) content).getContent();
} else {
result = Utils.objectToString(switchTitle);
result = Utils.objectToString(content);
}
}
TinyFormulaPane title = new TinyFormulaPane();
@ -345,7 +347,7 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
} else {
titleObj = titleString;
}
collection.getChart(i, Chart.class).setSwitchTitle(titleObj);
collection.getChart(i, Chart.class).setSwitchTitle(new SwitchTitle(titleObj));
}
}

Loading…
Cancel
Save