- Timestamp:
- 2019-09-24T17:50:54+02:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapView.java
r15121 r15371 29 29 import java.util.List; 30 30 import java.util.Set; 31 import java.util.TreeSet;32 31 import java.util.concurrent.CopyOnWriteArrayList; 33 32 import java.util.concurrent.atomic.AtomicBoolean; 33 import java.util.stream.Collectors; 34 34 35 35 import javax.swing.AbstractButton; … … 51 51 import org.openstreetmap.josm.gui.autofilter.AutoFilterManager; 52 52 import org.openstreetmap.josm.gui.datatransfer.OsmTransferHandler; 53 import org.openstreetmap.josm.gui.layer.GpxLayer;54 import org.openstreetmap.josm.gui.layer.ImageryLayer;55 53 import org.openstreetmap.josm.gui.layer.Layer; 56 54 import org.openstreetmap.josm.gui.layer.LayerManager; … … 67 65 import org.openstreetmap.josm.gui.layer.MapViewPaintable.PaintableInvalidationListener; 68 66 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 69 import org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer;70 67 import org.openstreetmap.josm.gui.layer.markerlayer.PlayHeadMarker; 71 68 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles; … … 819 816 */ 820 817 public String getLayerInformationForSourceTag() { 821 final Set<String> layerInfo = new TreeSet<>(); 822 if (!layerManager.getLayersOfType(GpxLayer.class).isEmpty()) { 823 // no i18n for international values 824 layerInfo.add("survey"); 825 } 826 for (final GeoImageLayer i : layerManager.getLayersOfType(GeoImageLayer.class)) { 827 if (i.isVisible()) { 828 layerInfo.add(i.getName()); 829 } 830 } 831 for (final ImageryLayer i : layerManager.getLayersOfType(ImageryLayer.class)) { 832 if (i.isVisible()) { 833 layerInfo.add(i.getInfo().getSourceName()); 834 } 835 } 818 final Set<String> layerInfo = layerManager.getVisibleLayersInZOrder().stream() 819 .filter(layer -> layer.getChangesetSourceTag() != null && !layer.getChangesetSourceTag().trim().isEmpty()) 820 .map(layer -> layer.getChangesetSourceTag().trim()).distinct().collect(Collectors.toSet()); 836 821 return Utils.join("; ", layerInfo); 837 822 } -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r14338 r15371 474 474 this.isExpertMode = isExpert; 475 475 } 476 477 @Override 478 public String getChangesetSourceTag() { 479 // no i18n for international values 480 return "survey"; 481 } 476 482 } -
trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java
r14757 r15371 355 355 return getClass().getSimpleName() + " [info=" + info + ']'; 356 356 } 357 358 @Override 359 public String getChangesetSourceTag() { 360 return getInfo().getSourceName(); 361 } 357 362 } -
trunk/src/org/openstreetmap/josm/gui/layer/Layer.java
r14153 r15371 675 675 } 676 676 677 /** 678 * Get the source for the layer 679 * @return The string for the changeset source tag or {@code null} 680 * @since 15371 681 */ 682 public String getChangesetSourceTag() { 683 return null; 684 } 685 677 686 @Override 678 687 public String toString() { -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r15333 r15371 1011 1011 updateBufferAndRepaint(); 1012 1012 } 1013 1014 @Override 1015 public String getChangesetSourceTag() { 1016 return getName(); 1017 } 1013 1018 }
Note:
See TracChangeset
for help on using the changeset viewer.