Changeset 17436 in josm


Ignore:
Timestamp:
2021-01-04T11:54:31+01:00 (2 weeks ago)
Author:
GerdP
Message:

see #20342: Validator results not cleared

  • make sure that validator tree is rebuild even if all found errors are ignored (regression from r13893)
File:
1 edited

Legend:

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

    r15975 r17436  
    7979        }
    8080
    81         if (ValidatorPrefHelper.PREF_USE_IGNORE.get()) {
    82             boolean allIgnored = true;
    83             for (TestError error : errors) {
    84                 if (!error.updateIgnored()) {
    85                     allIgnored = false;
    86                 }
    87             }
    88             if (allIgnored)
    89                 return true;
     81        if (Boolean.TRUE.equals(ValidatorPrefHelper.PREF_USE_IGNORE.get())) {
     82            errors.forEach(TestError::updateIgnored);
    9083        }
    9184
     
    9992            map.validatorDialog.tree.setErrors(errors);
    10093        }
    101         if (errors.isEmpty())
     94        if (errors.stream().allMatch(TestError::isIgnored))
    10295            return true;
    10396
Note: See TracChangeset for help on using the changeset viewer.