Changeset 10868 in josm
- Timestamp:
- 2016-08-21T15:41:19+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java
r10604 r10868 55 55 public String toString() { 56 56 StringBuilder builder = new StringBuilder(); 57 builder.append(id).append( Arrays.toString(keys)).append(getFlagsAsString());57 builder.append(id).append(' ').append(Arrays.toString(keys)).append(' ').append(getFlagsAsString()); 58 58 return builder.toString(); 59 59 } -
trunk/src/org/openstreetmap/josm/gui/datatransfer/data/PrimitiveTransferData.java
r10775 r10868 150 150 */ 151 151 public boolean hasIncompleteData() { 152 for (PrimitiveData pd : getAll()) { 153 if (pd.isIncomplete()) { 154 return true; 155 } 156 } 157 return false; 152 return getAll().stream().anyMatch(p -> p.isIncomplete() || !p.isVisible()); 158 153 } 159 154 } -
trunk/src/org/openstreetmap/josm/gui/datatransfer/importers/PrimitiveDataPaster.java
r10766 r10868 26 26 import org.openstreetmap.josm.gui.datatransfer.data.PrimitiveTransferData; 27 27 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 28 import org.openstreetmap.josm.tools.bugreport.BugReport; 28 29 29 30 /** … … 67 68 // Update references in copied buffer 68 69 for (PrimitiveData data : bufferCopy) { 69 if (data instanceof NodeData) { 70 NodeData nodeData = (NodeData) data; 71 nodeData.setEastNorth(nodeData.getEastNorth().add(offset)); 72 } else if (data instanceof WayData) { 73 updateNodes(newIds.get(OsmPrimitiveType.NODE), data); 74 } else if (data instanceof RelationData) { 75 updateMembers(newIds, data); 70 try { 71 if (data instanceof NodeData) { 72 NodeData nodeData = (NodeData) data; 73 nodeData.setEastNorth(nodeData.getEastNorth().add(offset)); 74 } else if (data instanceof WayData) { 75 updateNodes(newIds.get(OsmPrimitiveType.NODE), data); 76 } else if (data instanceof RelationData) { 77 updateMembers(newIds, data); 78 } 79 } catch (RuntimeException e) { 80 throw BugReport.intercept(e).put("data", data); 76 81 } 77 82 } … … 87 92 88 93 for (PrimitiveData data : pasteBuffer.getAll()) { 89 if (data.isIncomplete() ) {94 if (data.isIncomplete() || !data.isVisible()) { 90 95 continue; 91 96 }
Note:
See TracChangeset
for help on using the changeset viewer.