Changeset 18052 in josm for trunk/src/org
- Timestamp:
- 2021-07-17T18:19:24+02:00 (3 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/vector/VectorDataSet.java
r17867 r18052 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.vector; 3 4 import org.openstreetmap.josm.data.DataSource;5 import org.openstreetmap.josm.data.imagery.vectortile.mapbox.MVTTile;6 import org.openstreetmap.josm.data.osm.BBox;7 import org.openstreetmap.josm.data.osm.DataSelectionListener;8 import org.openstreetmap.josm.data.osm.DownloadPolicy;9 import org.openstreetmap.josm.data.osm.HighlightUpdateListener;10 import org.openstreetmap.josm.data.osm.IPrimitive;11 import org.openstreetmap.josm.data.osm.OsmData;12 import org.openstreetmap.josm.data.osm.PrimitiveId;13 import org.openstreetmap.josm.data.osm.Storage;14 import org.openstreetmap.josm.data.osm.UploadPolicy;15 import org.openstreetmap.josm.data.osm.WaySegment;16 import org.openstreetmap.josm.data.osm.event.IDataSelectionEventSource;17 import org.openstreetmap.josm.data.osm.event.IDataSelectionListener;18 import org.openstreetmap.josm.gui.mappaint.ElemStyles;19 import org.openstreetmap.josm.tools.ListenerList;20 import org.openstreetmap.josm.tools.Logging;21 import org.openstreetmap.josm.tools.SubclassFilteredCollection;22 3 23 4 import java.util.ArrayList; … … 41 22 import java.util.stream.Stream; 42 23 24 import org.openstreetmap.josm.data.DataSource; 25 import org.openstreetmap.josm.data.imagery.vectortile.mapbox.MVTTile; 26 import org.openstreetmap.josm.data.osm.BBox; 27 import org.openstreetmap.josm.data.osm.DataSelectionListener; 28 import org.openstreetmap.josm.data.osm.DownloadPolicy; 29 import org.openstreetmap.josm.data.osm.HighlightUpdateListener; 30 import org.openstreetmap.josm.data.osm.IPrimitive; 31 import org.openstreetmap.josm.data.osm.OsmData; 32 import org.openstreetmap.josm.data.osm.PrimitiveId; 33 import org.openstreetmap.josm.data.osm.Storage; 34 import org.openstreetmap.josm.data.osm.UploadPolicy; 35 import org.openstreetmap.josm.data.osm.WaySegment; 36 import org.openstreetmap.josm.data.osm.event.IDataSelectionEventSource; 37 import org.openstreetmap.josm.data.osm.event.IDataSelectionListener; 38 import org.openstreetmap.josm.gui.mappaint.ElemStyles; 39 import org.openstreetmap.josm.tools.ListenerList; 40 import org.openstreetmap.josm.tools.Logging; 41 import org.openstreetmap.josm.tools.SubclassFilteredCollection; 42 43 43 /** 44 44 * A data class for Vector Data … … 243 243 public Stream<VectorPrimitive> getPrimitivesById(PrimitiveId... primitiveIds) { 244 244 final Storage<MVTTile> dataStore = this.getBestZoomDataStore().orElse(null); 245 final Stream<VectorDataStore> dataStoreStream = dataStore != null ? dataStore.stream().map(MVTTile::getData) : Stream.empty();246 return Stream.concat(dataStoreStream,Stream.of(this.customDataStore)).map(VectorDataStore::getPrimitivesMap)245 return Stream.concat(dataStore != null ? dataStore.stream().map(MVTTile::getData) : Stream.empty(), 246 Stream.of(this.customDataStore)).map(VectorDataStore::getPrimitivesMap) 247 247 .flatMap(m -> Stream.of(primitiveIds).map(m::get)).filter(Objects::nonNull); 248 248 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityAction.java
r18018 r18052 78 78 * The real content, just to add a border 79 79 */ 80 protectedfinal JPanel content = new JPanel();81 protectedfinal List<VisibilityMenuEntry> sliders = new ArrayList<>();80 final JPanel content = new JPanel(); 81 final List<VisibilityMenuEntry> sliders = new ArrayList<>(); 82 82 83 83 /** -
trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
r17809 r18052 46 46 47 47 if (selected) { 48 s.selectedStyle = (s.selectedStyle == null ? new DividedScale<StyleElementList>() :s.selectedStyle).put(o, r);48 s.selectedStyle = scale(s.selectedStyle).put(o, r); 49 49 } else { 50 s.plainStyle = (s.plainStyle == null ? new DividedScale<StyleElementList>() :s.plainStyle).put(o, r);50 s.plainStyle = scale(s.plainStyle).put(o, r); 51 51 } 52 52 return s.intern(); 53 } 54 55 private static DividedScale<StyleElementList> scale(DividedScale<StyleElementList> scale) { 56 return scale == null ? new DividedScale<>() : scale; 53 57 } 54 58
Note:
See TracChangeset
for help on using the changeset viewer.