From c9cb2e9aea5ad4413821c4909db88e3e45f40fe4 Mon Sep 17 00:00:00 2001 From: zheng Date: Thu, 11 Oct 2018 14:59:04 +0800 Subject: [PATCH] =?UTF-8?q?CHART-2982=20gis=E8=BD=AE=E6=92=AD=E5=9B=BE=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9typepane=20update=E6=97=B6=E5=80=99=E4=BC=9A?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E9=BB=98=E8=AE=A4chart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/chart/gui/ChartTypePane.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 e847f190c6..cc9a201048 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 @@ -152,9 +152,10 @@ public class ChartTypePane extends AbstractChartAttrPane{ try{ Chart newDefaultChart = (Chart)((AbstractChartTypePane)getSelectedPane()).getDefaultChart().clone(); - if(!chart.accept(newDefaultChart.getClass())){ - //vanChart 和 chart 之间切换 - editingCollection.removeNameObject(editingCollection.getSelectedIndex()); + if (!ComparatorUtils.equals(chart.getClass(), newDefaultChart.getClass())) { + //vanChart 和 chart 之间切换 + //不同chart之间切换 + editingCollection.removeNameObject(editingCollection.getSelectedIndex()); editingCollection.addChart(newDefaultChart); chart = newDefaultChart; }