Browse Source

CHART-15968 解决标签界面属性保存错误

feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
527c131c62
  1. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartLabelPane.java

5
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartLabelPane.java

@ -64,11 +64,14 @@ public class VanChartLabelPane extends AbstractVanChartScrollPane<Chart> {
return; return;
} }
ConditionAttr attrList = chart.getPlot().getConditionCollection().getDefaultAttr(); ConditionAttr attrList = chart.getPlot().getConditionCollection().getDefaultAttr();
// labelPane中颜色选择器会触发listener.doChange(),导致style界面update两次,
// 为了避免递归updateBean时,remove与add不匹配,调整一下labelPane.update()的位置
AttrLabel attrLabel = labelPane.update();
DataSeriesCondition attr = ((VanChartPlot)chart.getPlot()).getAttrLabelFromConditionCollection(); DataSeriesCondition attr = ((VanChartPlot)chart.getPlot()).getAttrLabelFromConditionCollection();
if(attr != null) { if(attr != null) {
attrList.remove(attr); attrList.remove(attr);
} }
AttrLabel attrLabel = labelPane.update();
if (attrLabel != null) { if (attrLabel != null) {
attrList.addDataSeriesCondition(attrLabel); attrList.addDataSeriesCondition(attrLabel);
} }

Loading…
Cancel
Save