Changeset 3745 in josm


Ignore:
Timestamp:
2010-12-27T13:56:11+01:00 (11 years ago)
Author:
bastiK
Message:

fixed #5752 - validator: warning window on upload is broken (2)

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/upload/ValidateUploadHook.java

    r3671 r3745  
    5858            test.visit(selection);
    5959            test.endTest();
    60             if (Main.pref.getBoolean(ValidatorPreference.PREF_OTHER_UPLOAD, false)) {
     60            if (Main.pref.getBoolean(ValidatorPreference.PREF_OTHER, false) &&
     61                Main.pref.getBoolean(ValidatorPreference.PREF_OTHER_UPLOAD, false))
     62            {
    6163                errors.addAll( test.getErrors() );
    6264            }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java

    r3742 r3745  
    148148        }
    149149
    150         boolean other = Main.pref.getBoolean(ValidatorPreference.PREF_OTHER_UPLOAD, false);
     150        boolean other = Main.pref.getBoolean(ValidatorPreference.PREF_OTHER, false);
    151151        for (TestError e : errors) {
    152152            if (e.getIgnored()) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/ValidatorPreference.java

    r3735 r3745  
    55
    66import java.awt.GridBagLayout;
     7import java.awt.event.ActionEvent;
     8import java.awt.event.ActionListener;
    79import java.util.Collection;
    810
     
    9294        testPanel.add(prefOtherUpload, GBC.eol());
    9395
     96        ActionListener otherUploadEnabled = new ActionListener() {
     97            public void actionPerformed(ActionEvent e) {
     98                prefOtherUpload.setEnabled(prefOther.isSelected());
     99            }
     100        };
     101        prefOther.addActionListener(otherUploadEnabled);
     102        otherUploadEnabled.actionPerformed(null);
     103
    94104        GBC a = GBC.eol().insets(-5,0,0,0);
    95105        a.anchor = GBC.EAST;
Note: See TracChangeset for help on using the changeset viewer.