Changeset 16091 in josm
- Timestamp:
- 2020-03-08T20:32:18+01:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ValidateAction.java
r15976 r16091 68 68 69 69 OsmValidator.initializeTests(); 70 OsmValidator.initializeErrorLayer();71 70 72 71 Collection<Test> tests = OsmValidator.getEnabledTests(false); … … 144 143 map.validatorDialog.unfurlDialog(); 145 144 map.validatorDialog.tree.setErrors(errors); 146 //FIXME: nicer way to find / invalidate the corresponding error layer 147 MainApplication.getLayerManager().getLayersOfType(ValidatorLayer.class).forEach(ValidatorLayer::invalidate); 145 if (!errors.isEmpty()) { 146 //FIXME: nicer way to find / invalidate the corresponding error layer 147 OsmValidator.initializeErrorLayer(); 148 MainApplication.getLayerManager().getLayersOfType(ValidatorLayer.class).forEach(ValidatorLayer::invalidate); 149 } 148 150 }); 149 151 } … … 154 156 if (tests == null || tests.isEmpty()) 155 157 return; 156 errors = new ArrayList<>( 200);158 errors = new ArrayList<>(); 157 159 getProgressMonitor().setTicksCount(tests.size() * validatedPrimitives.size()); 158 160 int testCounter = 0; … … 171 173 } 172 174 tests = null; 173 if (ValidatorPrefHelper.PREF_USE_IGNORE.get()) { 175 if (Boolean.TRUE.equals(ValidatorPrefHelper.PREF_USE_IGNORE.get())) { 174 176 getProgressMonitor().setCustomText(""); 175 177 getProgressMonitor().subTask(tr("Updating ignored errors ...")); -
trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
r16069 r16091 486 486 */ 487 487 public static synchronized void initializeErrorLayer() { 488 if (!ValidatorPrefHelper.PREF_LAYER.get()) 489 return; 490 if (errorLayer == null) { 488 if (errorLayer == null && Boolean.TRUE.equals(ValidatorPrefHelper.PREF_LAYER.get())) { 491 489 errorLayer = new ValidatorLayer(); 492 490 MainApplication.getLayerManager().addLayer(errorLayer);
Note:
See TracChangeset
for help on using the changeset viewer.