- Timestamp:
- 2023-07-10T22:19:01+02:00 (17 months ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/upload/ValidateUploadHook.java
r18775 r18776 15 15 import org.openstreetmap.josm.data.APIDataSet; 16 16 import org.openstreetmap.josm.data.osm.OsmPrimitive; 17 import org.openstreetmap.josm.data.preferences.sources.ValidatorPrefHelper;18 17 import org.openstreetmap.josm.data.validation.OsmValidator; 19 import org.openstreetmap.josm.data.validation.Severity;20 18 import org.openstreetmap.josm.data.validation.TestError; 21 19 import org.openstreetmap.josm.data.validation.ValidationTask; … … 53 51 OsmValidator.initializeTests(); 54 52 new ValidationTask(errors -> { 55 if (!Boolean.TRUE.equals(ValidatorPrefHelper.PREF_OTHER_UPLOAD.get())) {56 // Use >= just in case we add additional levels.57 errors.removeIf(error -> error.getSeverity().getLevel() >= Severity.OTHER.getLevel());58 }59 53 if (errors.stream().allMatch(TestError::isIgnored)) { 60 54 returnCode.set(true); -
trunk/src/org/openstreetmap/josm/data/validation/ValidationTask.java
r18752 r18776 108 108 } 109 109 if (this.onFinish != null) { 110 // Remove any low severity issues if they are not desired. 111 if (!(Boolean.TRUE.equals(ValidatorPrefHelper.PREF_OTHER.get()) && 112 (!this.beforeUpload || Boolean.TRUE.equals(ValidatorPrefHelper.PREF_OTHER_UPLOAD.get())))) { 113 // Use >= just in case we add additional levels. 114 this.errors.removeIf(error -> error.getSeverity().getLevel() >= Severity.OTHER.getLevel()); 115 } 110 116 this.onFinish.accept(this.errors); 111 117 } … … 125 131 getProgressMonitor().setCustomText(tr("Test {0}/{1}: Starting {2}", testCounter, tests.size(), test.getName())); 126 132 test.setBeforeUpload(this.beforeUpload); 127 test.setPartialSelection(formerValidatedPrimitives != null); 133 // Pre-upload checks only run on a partial selection. 134 test.setPartialSelection(this.beforeUpload || formerValidatedPrimitives != null); 128 135 test.startTest(getProgressMonitor().createSubTaskMonitor(validatedPrimitives.size(), false)); 129 136 test.visit(validatedPrimitives);
Note:
See TracChangeset
for help on using the changeset viewer.