Project

General

Profile

« Previous | Next » 

Revision b0d7867b

Added by Patrick Plitzner almost 9 years ago

  • removed empty element from combo dropdown #4448

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/StatisticalMeasureCollectionElement.java
56 56
        this.entity = entity;
57 57
        if(entity.getId()!=0){
58 58
            comboStatisticalMeasure.setSelection(entity);
59
            comboStatisticalMeasure.removeEmptyElement();
59 60
        }
60 61
    }
61 62

  
......
63 64
    public void handleEvent(Object eventSource) {
64 65
        if(eventSource==comboStatisticalMeasure && comboStatisticalMeasure.getSelection()!=null){
65 66
            if(getParentElement() instanceof StatisticalMeasureCollectionSection){
66
                Feature feature = ((StatisticalMeasureCollectionSection) getParentElement()).getEntity();
67
                StatisticalMeasureCollectionSection parentElement = (StatisticalMeasureCollectionSection) getParentElement();
68
                Feature feature = parentElement.getEntity();
67 69
                feature.removeRecommendedStatisticalMeasure(entity);
68 70
                StatisticalMeasure statisticalMeasure = comboStatisticalMeasure.getSelection();
69 71
                feature.addRecommendedStatisticalMeasure(statisticalMeasure);
70 72
                entity = statisticalMeasure;
73
                //update the parent section to re-set the listeners to the persisted measurement unit
74
                parentElement.removeElementAndUpdate(null);
71 75
            }
72 76
        }
73 77
    }

Also available in: Unified diff