Changeset 2471 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2009-11-18T18:50:38+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java
r2444 r2471 10 10 import java.util.Collection; 11 11 import java.util.Collections; 12 import java.util.logging.Logger; 12 13 13 14 import javax.swing.JOptionPane; … … 138 139 */ 139 140 static class UpdatePrimitivesTask extends PleaseWaitRunnable { 141 static private final Logger logger = Logger.getLogger(UpdatePrimitivesTask.class.getName()); 142 140 143 private DataSet ds; 141 144 private boolean canceled; … … 144 147 private MultiFetchServerObjectReader reader; 145 148 149 /** 150 * 151 * @param toUpdate a collection of primitives to update from the server 152 */ 146 153 public UpdatePrimitivesTask(Collection<? extends OsmPrimitive> toUpdate) { 147 154 super(tr("Update objects"), false /* don't ignore exception*/); … … 166 173 return; 167 174 } 168 if (ds != null ) {169 Main.ma p.mapView.getEditLayer().mergeFrom(ds);170 Main.ma p.mapView.getEditLayer().onPostDownloadFromServer();175 if (ds != null && Main.main.getEditLayer() != null) { 176 Main.main.getEditLayer().mergeFrom(ds); 177 Main.main.getEditLayer().onPostDownloadFromServer(); 171 178 } 172 179 } … … 202 209 } 203 210 } 211 204 212 205 213 @Override -
trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
r2444 r2471 83 83 if (mergeById(source)) 84 84 return; 85 if (!source.isVisible())86 87 return;85 //if (!source.isVisible()) 86 // ignore it 87 // return; 88 88 } else { 89 89 // try to merge onto a primitive which has no id assigned … … 236 236 * Tries to merge a primitive <code>source</code> into an existing primitive with the same id. 237 237 * 238 * @param source the other primitive which is to be merged onto a primitive in my primitives238 * @param source the source primitive which is to be merged into a target primitive 239 239 * @return true, if this method was able to merge <code>source</code> into a target object; false, otherwise 240 240 */ -
trunk/src/org/openstreetmap/josm/data/osm/User.java
r2455 r2471 7 7 import java.util.HashMap; 8 8 import java.util.List; 9 import java.util.concurrent.atomic.AtomicLong; 9 10 10 11 /** … … 18 19 */ 19 20 public class User { 20 static private long uidCounter = 0; 21 22 static private AtomicLong uidCounter = new AtomicLong(); 23 21 24 /** 22 25 * the map of known users … … 27 30 private static long getNextLocalUid() { 28 31 synchronized(User.class) { 29 uidCounter--; 30 return uidCounter; 32 return uidCounter.decrementAndGet(); 31 33 } 32 34 } … … 60 62 } 61 63 64 /** 65 * clears the static map of user ids to user objects 66 * 67 */ 68 public static void clearUserMap() { 69 userMap.clear(); 70 } 62 71 63 72 /**
Note:
See TracChangeset
for help on using the changeset viewer.