this.entity = entity;
if(entity.getId()!=0){
comboStatisticalMeasure.setSelection(entity);
+ comboStatisticalMeasure.removeEmptyElement();
}
}
public void handleEvent(Object eventSource) {
if(eventSource==comboStatisticalMeasure && comboStatisticalMeasure.getSelection()!=null){
if(getParentElement() instanceof StatisticalMeasureCollectionSection){
- Feature feature = ((StatisticalMeasureCollectionSection) getParentElement()).getEntity();
+ StatisticalMeasureCollectionSection parentElement = (StatisticalMeasureCollectionSection) getParentElement();
+ Feature feature = parentElement.getEntity();
feature.removeRecommendedStatisticalMeasure(entity);
StatisticalMeasure statisticalMeasure = comboStatisticalMeasure.getSelection();
feature.addRecommendedStatisticalMeasure(statisticalMeasure);
entity = statisticalMeasure;
+ //update the parent section to re-set the listeners to the persisted measurement unit
+ parentElement.removeElementAndUpdate(null);
}
}
}