diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java index 4dedb133d..880c1a779 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java @@ -3,7 +3,6 @@ package com.fr.design.mainframe.chart.gui; import com.fr.base.BaseUtils; import com.fr.chart.base.AttrChangeConfig; import com.fr.chart.chartattr.ChartCollection; -import com.fr.chart.chartattr.SwitchState; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chartx.attr.ChartProvider; import com.fr.design.beans.BasicBeanPane; @@ -187,12 +186,6 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen private void calculateMultiChartMode() { //设置切换功能是否可用 editingCollection.getChangeConfigAttr().setEnable(changeEnable()); - //多图表切换模式 - if (editingCollection.getChartCount() > 1) { - editingCollection.setState(SwitchState.CHANGE); - } else { - editingCollection.setState(SwitchState.DEFAULT); - } } /** @@ -363,7 +356,7 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen private void checkConfigButtonVisible() { addButton.setVisible(ChartTypeManager.enabledChart(editingCollection.getSelectedChartProvider().getID())); //新建一个collection - if (editingCollection.getState() == SwitchState.DEFAULT && editingCollection.getSelectedChartProvider() != null) { + if (editingCollection.getChartCount() == 1 && editingCollection.getSelectedChartProvider() != null) { //Chart 不支持图表切换 configButton.setVisible(supportChange()); } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java index e9dcbedce..eb43b8594 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -1,7 +1,6 @@ package com.fr.design.mainframe.chart.gui; import com.fr.chart.chartattr.ChartCollection; -import com.fr.chart.chartattr.SwitchState; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chartx.attr.ChartProvider; import com.fr.design.ChartTypeInterfaceManager; @@ -218,7 +217,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ //第一步就是重构cards cards.clear(); if (enabledChart) { - if (collection.getState() == SwitchState.DEFAULT) { + if (collection.getChartCount() == 1) { addAllCards(); } else { addOnePriorityCards(priority);