From b7fae76db7bc6b074cd53dd88138ad97c6a5e224 Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 27 Sep 2021 19:50:41 +0800 Subject: [PATCH] =?UTF-8?q?CHART-20937=20fix:=E4=B8=8D=E6=96=B0=E5=88=9B?= =?UTF-8?q?=E5=BB=BAeditpane=E4=BD=86=E6=98=AF=E8=A6=81=E9=87=8D=E7=BD=AEl?= =?UTF-8?q?astChartCollection=20=E5=90=A6=E5=88=99=E4=B8=8D=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/chart/ChartEditPaneProvider.java | 3 +++ .../main/java/com/fr/design/mainframe/ChartPropertyPane.java | 2 ++ .../java/com/fr/design/mainframe/chart/ChartEditPane.java | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/chart/ChartEditPaneProvider.java b/designer-base/src/main/java/com/fr/design/gui/chart/ChartEditPaneProvider.java index 3003800364..0a3684ba30 100644 --- a/designer-base/src/main/java/com/fr/design/gui/chart/ChartEditPaneProvider.java +++ b/designer-base/src/main/java/com/fr/design/gui/chart/ChartEditPaneProvider.java @@ -16,4 +16,7 @@ public interface ChartEditPaneProvider { default void removeChartEditPaneActionListener(ChartEditPaneActionListener l) { } + default void resetLastChartCollection() { + } + } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java index 90b0e88054..2d4d5fef6c 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java @@ -55,6 +55,8 @@ public class ChartPropertyPane extends BaseChartPropertyPane { chartEditPane.setContainer(container); currentID = plotID; resetChartEditPane(); + } else { + chartEditPane.resetLastChartCollection(); } } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java index d6acb929a7..70b7130f12 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java @@ -118,6 +118,10 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare this.listenerList.remove(ChartEditPaneActionListener.class, l); } + public void resetLastChartCollection() { + this.lastCollection = null; + } + private void fireAttributeChange(ChartCollection chartCollection) { // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList();