diff --git a/designer_base/src/com/fr/design/gui/icombobox/FRTreeComboBox.java b/designer_base/src/com/fr/design/gui/icombobox/FRTreeComboBox.java index 3ddec17d2..a60942229 100644 --- a/designer_base/src/com/fr/design/gui/icombobox/FRTreeComboBox.java +++ b/designer_base/src/com/fr/design/gui/icombobox/FRTreeComboBox.java @@ -247,7 +247,17 @@ public class FRTreeComboBox extends UIComboBox { } @Override protected UIButton createArrowButton() { - arrowButton = new UIButton(UIConstants.ARROW_DOWN_ICON); + arrowButton = new UIButton(UIConstants.ARROW_DOWN_ICON){ + /** + * 组件是否需要响应添加的观察者事件 + * + * @return 如果需要响应观察者事件则返回true,否则返回false + */ + @Override + public boolean shouldResponseChangeListener() { + return false; + } + }; ((UIButton) arrowButton).setRoundBorder(true, Constants.LEFT); arrowButton.addMouseListener(this); comboBox.addMouseListener(this); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java index 78f3f6271..c6d42386b 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -129,7 +129,9 @@ public class ChartTypePane extends AbstractChartAttrPane{ } public void updateBean(Chart chart) { - int lastSelectIndex = editPane.getSelectedChartIndex(chart); + + Plot oldPlot = chart.getPlot(); + String lastPlotID = oldPlot == null ? StringUtils.EMPTY : oldPlot.getPlotID(); try{ Chart newDefaultChart = (Chart)((AbstractChartTypePane)getSelectedPane()).getDefaultChart().clone(); @@ -159,7 +161,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ boolean isUseDefault = ChartTypeInterfaceManager.getInstance().isUseDefaultPane(plotID); - if(editPane.isDefaultPane() != isUseDefault || (!isUseDefault && lastSelectIndex != jcb.getSelectedIndex())){ + if(editPane.isDefaultPane() != isUseDefault || (!isUseDefault && !ComparatorUtils.equals(lastPlotID, plotID))){ editPane.reLayout(chart); } }