Project

General

Profile

« Previous | Next » 

Revision d7936791

Added by Katja Luther over 5 years ago

do not save cdm preference which are not changed

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/ChecklistEditorGeneralPreference.java
46 46
    boolean isShowTitle;
47 47
    String displayString;
48 48
    Composite child ;
49
    CdmPreference pref = null;
49
    CdmPreference distributionPref = null;
50 50

  
51 51
    @Override
52 52
    protected Control createContents(Composite parent) {
53 53

  
54 54
        Composite composite = new Composite(parent, SWT.NULL);
55 55
        composite.setLayout(new GridLayout());
56
        pref = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.DistributionEditorActivated);
57
        if (pref != null){
58
            isEditorActivated = Boolean.valueOf(pref.getValue());
59
            allowOverride = pref.isAllowOverride();
56
        distributionPref = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.DistributionEditorActivated);
57
        if (distributionPref != null){
58
            isEditorActivated = Boolean.valueOf(distributionPref.getValue());
59
            allowOverride = distributionPref.isAllowOverride();
60 60
        }else{
61
            distributionPref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.DistributionEditorActivated, "false");
61 62
            isEditorActivated = false;
62 63
        }
63 64

  
......
110 111
        description.setText(Messages.ChecklistEditorGeneralPreference_Configure_display_of_Areas);
111 112

  
112 113
        final Button showIdInVocabulary = new Button(child, SWT.RADIO);
113
        pref = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.ShowIdInVocabulary);
114
        CdmPreference pref = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.ShowIdInVocabulary);
114 115
        if (pref != null){
115 116
            isShowIdInVocabulary = Boolean.valueOf(pref.getValue());
116 117
        }else{
......
237 238

  
238 239
    @Override
239 240
    public boolean performOk() {
240
        if (pref == null){
241
        if (distributionPref == null){
241 242
            return true;
242 243
        }
243 244
        ICdmRepository controller = CdmStore.getCurrentApplicationConfiguration();

Also available in: Unified diff