Changeset 13149 in josm for trunk/src/org
- Timestamp:
- 2017-11-23T01:19:28+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r12951 r13149 45 45 import org.openstreetmap.josm.data.validation.ValidatorVisitor; 46 46 import org.openstreetmap.josm.gui.MainApplication; 47 import org.openstreetmap.josm.gui.MapFrame;48 47 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 49 48 import org.openstreetmap.josm.gui.PopupMenuHandler; 50 49 import org.openstreetmap.josm.gui.SideButton; 51 50 import org.openstreetmap.josm.gui.dialogs.validator.ValidatorTreePanel; 52 import org.openstreetmap.josm.gui.layer.Layer;53 51 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent; 54 52 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener; … … 320 318 tree.resetErrors(); 321 319 OsmValidator.saveIgnoredErrors(); 322 MainApplication.getLayerManager().getLayersOfType(ValidatorLayer.class).forEach(Layer::invalidate);320 invalidateValidatorLayers(); 323 321 } 324 322 } … … 477 475 @Override 478 476 public void mouseClicked(MouseEvent e) { 477 TreePath selPath = tree.getPathForLocation(e.getX(), e.getY()); 478 if (selPath == null) { 479 tree.clearSelection(); 480 } 481 479 482 fixButton.setEnabled(false); 480 483 if (ignoreButton != null) { … … 501 504 } 502 505 503 @Override public void launch(MouseEvent e) { 506 @Override 507 public void launch(MouseEvent e) { 504 508 TreePath selPath = tree.getPathForLocation(e.getX(), e.getY()); 505 509 if (selPath == null) … … 510 514 super.launch(e); 511 515 } 512 513 516 } 514 517 … … 529 532 fixButton.setEnabled(hasFixes); 530 533 popupMenuHandler.setPrimitives(sel); 531 MapFrame map = MainApplication.getMap(); 532 if (map != null) { 533 map.repaint(); 534 } 534 invalidateValidatorLayers(); 535 535 } 536 536 } … … 648 648 SwingUtilities.invokeAndWait(() -> { 649 649 MainApplication.undoRedo.afterAdd(); 650 MainApplication.getLayerManager().getLayersOfType(ValidatorLayer.class).forEach(ValidatorLayer::invalidate);650 invalidateValidatorLayers(); 651 651 tree.resetErrors(); 652 652 }); … … 659 659 } 660 660 } 661 662 private static void invalidateValidatorLayers() { 663 MainApplication.getLayerManager().getLayersOfType(ValidatorLayer.class).forEach(ValidatorLayer::invalidate); 664 } 661 665 }
Note:
See TracChangeset
for help on using the changeset viewer.