Browse Source

Merge pull request #444 in BA/design from ~ZHENG/design:dev to dev

* commit '2098db2594bc4bcabc1e66e6c837cb97fb9ccdae':
  选中图表按id看是否相同,不按index。因为图表切换plotlist会变
master
superman 8 years ago
parent
commit
bfef7fe497
  1. 12
      designer_base/src/com/fr/design/gui/icombobox/FRTreeComboBox.java
  2. 6
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java

12
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);

6
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);
}
}

Loading…
Cancel
Save