Browse Source

Pull request #5642: CHART-20517 图表类型编辑之后再重置标题

Merge in DESIGN/design from ~BJORN/design:release/10.0 to release/10.0

* commit 'bec1ebd012b8049444ed664c1124d6c8d718f59c':
  CHART-20517  图表类型编辑之后再重置标题
zheng-1641779399395
Bjorn 3 years ago
parent
commit
5e9e60e3b7
  1. 7
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java

7
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -222,6 +222,7 @@ public class ChartTypePane extends AbstractChartAttrPane {
String lastPlotID = chart.getID();
boolean chartTypeChange = false;
try {
AbstractChartTypePane selectedPane = (AbstractChartTypePane) getSelectedPane();
ChartProvider newDefaultChart = (ChartProvider) ChartTypeManager.getInstanceWithCheck().getCharts(selectedPane.getPlotID())[0].clone();
@ -231,13 +232,16 @@ public class ChartTypePane extends AbstractChartAttrPane {
editingCollection.removeNameObject(editingCollection.getSelectedIndex());
editingCollection.addChart(newDefaultChart);
chart = newDefaultChart;
chartTypeChange = true;
}
} catch (CloneNotSupportedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
//这一步会替换plot
String id = chart.getID();
((AbstractChartTypePane) getSelectedPane()).updateBean(chart);
if (inForm) {
chartTypeChange = chartTypeChange || !ComparatorUtils.equals(id, chart.getID());
if (inForm && chartTypeChange) {
chart.resetAttrInForm();
}
reLayoutEditPane(chart, lastPlotID);
@ -465,5 +469,6 @@ public class ChartTypePane extends AbstractChartAttrPane {
public void registerChartEditPane(ChartEditPane currentEditPane) {
this.editPane = currentEditPane;
this.inForm = editPane.isInForm();
buttonPane.refreshChartInForm(inForm);
}
}
Loading…
Cancel
Save