Browse Source

Merge pull request #5649 in DESIGN/design from release/10.0 to release/11.0

* commit '16f0d2cfb431b24fc82de0289d6bb01d45c85064':
  CHART-20517  图表类型编辑之后再重置标题
  CHART-20517  图表类型编辑之后再重置标题
  REPORT-58394 fix:不安装旧版本图表插件 只是不能新建 图表配置面板也是要出来的
persist/11.0
superman 3 years ago
parent
commit
8a411d9bca
  1. 10
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java

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

@ -173,8 +173,7 @@ public class ChartTypePane extends AbstractChartAttrPane {
Map<Integer, Map<String, FurtherBasicBeanPane<? extends ChartProvider>>> allChartTypePane,
ActionListener autoButtonListener) {
String[] chartIDs = ChartTypeManager.getInstance().getAllChartIDs();
String[] chartIDs = ChartTypeManager.getInstance().getAllChartIDsIncludeDisabled();
for (String id : chartIDs) {
@ -222,6 +221,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 +231,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 +468,6 @@ public class ChartTypePane extends AbstractChartAttrPane {
public void registerChartEditPane(ChartEditPane currentEditPane) {
this.editPane = currentEditPane;
this.inForm = editPane.isInForm();
buttonPane.refreshChartInForm(inForm);
}
}
Loading…
Cancel
Save