Ignore:
Timestamp:
2013-10-27T02:38:21+01:00 (10 years ago)
Author:
Don-vip
Message:

fix #9205 - validation run on upload is not updating validation window when there is no error

File:
1 edited

Legend:

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

    r6084 r6331  
    3434 *
    3535 * @author frsantos
     36 * @since 3669
    3637 */
    37 public class ValidateUploadHook implements UploadHook
    38 {
    39     /** Serializable ID */
    40     private static final long serialVersionUID = -2304521273582574603L;
    41 
     38public class ValidateUploadHook implements UploadHook {
     39   
    4240    /**
    4341     * Validate the modified data before uploading
     
    6260            test.endTest();
    6361            if (Main.pref.getBoolean(ValidatorPreference.PREF_OTHER, false) &&
    64                 Main.pref.getBoolean(ValidatorPreference.PREF_OTHER_UPLOAD, false))
    65             {
    66                 errors.addAll( test.getErrors() );
    67             }
    68             else {
     62                Main.pref.getBoolean(ValidatorPreference.PREF_OTHER_UPLOAD, false)) {
     63                errors.addAll(test.getErrors());
     64            } else {
    6965                for (TestError e : test.getErrors()) {
    7066                    if (e.getSeverity() != Severity.OTHER) {
     
    7571        }
    7672        tests = null;
     73        Main.map.validatorDialog.tree.setErrors(errors);
    7774        if (errors == null || errors.isEmpty())
    7875            return true;
     
    141138        ed.showDialog();
    142139
    143         if(ed.getValue() != 1) {
     140        if (ed.getValue() != 1) {
    144141            OsmValidator.initializeErrorLayer();
    145142            Main.map.validatorDialog.unfurlDialog();
    146             Main.map.validatorDialog.tree.setErrors(errors);
    147143            Main.main.getCurrentDataSet().fireSelectionChanged();
    148144            return false;
Note: See TracChangeset for help on using the changeset viewer.