Changeset 5415 in josm
- Timestamp:
- 2012-08-10T00:53:55+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
r5300 r5415 296 296 @Override 297 297 public void layerRemoved(Layer oldLayer) { 298 if (oldLayer instanceof OsmDataLayer && Main.map.mapView.getActiveLayer() == oldLayer) {299 Main.map.validatorDialog.tree.setErrorList(new ArrayList<TestError>());300 }301 298 if (oldLayer == errorLayer) { 302 299 errorLayer = null; -
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r5360 r5415 85 85 private DefaultMutableTreeNode lastSelectedNode = null; 86 86 87 private OsmDataLayer linkedLayer; 88 87 89 /** 88 90 * Constructor … … 367 369 } 368 370 } 369 Main.main.getCurrentDataSet().setSelected(sel); 371 DataSet ds = Main.main.getCurrentDataSet(); 372 if (ds != null) { 373 ds.setSelected(sel); 374 } 370 375 } 371 376 … … 427 432 public void activeLayerChange(Layer oldLayer, Layer newLayer) { 428 433 if (newLayer instanceof OsmDataLayer) { 429 tree.setErrorList(((OsmDataLayer) newLayer).validationErrors); 434 linkedLayer = (OsmDataLayer)newLayer; 435 tree.setErrorList(linkedLayer.validationErrors); 430 436 } 431 437 } … … 435 441 436 442 @Override 437 public void layerRemoved(Layer oldLayer) {} 443 public void layerRemoved(Layer oldLayer) { 444 if (oldLayer == linkedLayer) { 445 tree.setErrorList(new ArrayList<TestError>()); 446 } 447 } 438 448 439 449 /**
Note:
See TracChangeset
for help on using the changeset viewer.