Changeset 5171 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2012-04-06T15:56:23+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmChangeTask.java
r4874 r5171 3 3 import java.util.ArrayList; 4 4 import java.util.Date; 5 import java.util.HashSet; 5 6 import java.util.Iterator; 6 7 import java.util.List; 8 import java.util.Set; 7 9 import java.util.concurrent.Future; 8 10 … … 83 85 try { 84 86 // A changeset does not contain all referred primitives, this is the list of incomplete ones 85 List<OsmPrimitive> toLoad = new ArrayList<OsmPrimitive>();87 Set<OsmPrimitive> toLoad = new HashSet<OsmPrimitive>(); 86 88 // For each incomplete primitive, we'll have to get its state at date it was referred 87 89 List<Pair<OsmPrimitive, Date>> toMonitor = new ArrayList<Pair<OsmPrimitive, Date>>(); … … 95 97 } 96 98 } 97 toLoad.add(p); 98 toMonitor.add(new Pair<OsmPrimitive, Date>(p, timestamp)); 99 if (toLoad.add(p)) { 100 toMonitor.add(new Pair<OsmPrimitive, Date>(p, timestamp)); 101 } 99 102 } 100 103 } … … 151 154 152 155 data.setUser(hp.getUser()); 153 data.setVisible(hp.isVisible()); 156 try { 157 data.setVisible(hp.isVisible()); 158 } catch (IllegalStateException e) { 159 System.err.println("Cannot change visibility for "+pair.a+": "+e.getMessage()); 160 } 154 161 data.setTimestamp(hp.getTimestamp()); 155 162 data.setKeys(hp.getTags()); -
trunk/src/org/openstreetmap/josm/data/osm/history/History.java
r4724 r5171 160 160 * @return the primitive id 161 161 */ 162 public PrimitiveId getPrimit miveId() {162 public PrimitiveId getPrimitiveId() { 163 163 return new SimplePrimitiveId(id, type); 164 164 } -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialog.java
r4297 r5171 123 123 /* ---------------------------------------------------------------------------------- */ 124 124 public void historyUpdated(HistoryDataSet source, PrimitiveId primitiveId) { 125 if (primitiveId == null || primitiveId.equals(browser.getHistory().getPrimit miveId())) {126 browser.populate(source.getHistory(browser.getHistory().getPrimit miveId()));125 if (primitiveId == null || primitiveId.equals(browser.getHistory().getPrimitiveId())) { 126 browser.populate(source.getHistory(browser.getHistory().getPrimitiveId())); 127 127 } 128 128 } -
trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java
r4310 r5171 120 120 public HistoryLoadTask add(History history) { 121 121 CheckParameterUtil.ensureParameterNotNull(history, "history"); 122 toLoad.add(history.getPrimit miveId());122 toLoad.add(history.getPrimitiveId()); 123 123 return this; 124 124 }
Note:
See TracChangeset
for help on using the changeset viewer.