Changeset 2025 in josm for trunk/src/org/openstreetmap/josm/command
- Timestamp:
- 2009-09-02T21:17:52+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/command
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/ChangeCommand.java
r1990 r2025 36 36 super.executeCommand(); 37 37 osm.cloneFrom(newOsm); 38 osm. modified = true;38 osm.setModified(true); 39 39 return true; 40 40 } … … 47 47 String msg = ""; 48 48 switch(OsmPrimitiveType.from(osm)) { 49 case NODE: msg = marktr("Change node {0}"); break;50 case WAY: msg = marktr("Change way {0}"); break;51 case RELATION: msg = marktr("Change relation {0}"); break;49 case NODE: msg = marktr("Change node {0}"); break; 50 case WAY: msg = marktr("Change way {0}"); break; 51 case RELATION: msg = marktr("Change relation {0}"); break; 52 52 } 53 53 return new DefaultMutableTreeNode( -
trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
r2008 r2025 77 77 if (value == null) { 78 78 for (OsmPrimitive osm : objects) { 79 osm. modified = true;79 osm.setModified(true); 80 80 osm.remove(key); 81 81 } 82 82 } else { 83 83 for (OsmPrimitive osm : objects) { 84 osm. modified = true;84 osm.setModified(true); 85 85 osm.put(key, value); 86 86 } -
trunk/src/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommand.java
r1990 r2025 51 51 relation.getMember(position).role = newRole; 52 52 53 oldModified = relation. modified;54 relation. modified = true;53 oldModified = relation.isModified(); 54 relation.setModified(true); 55 55 return true; 56 56 } … … 58 58 @Override public void undoCommand() { 59 59 relation.getMember(position).role = oldRole; 60 relation. modified = oldModified;60 relation.setModified(oldModified); 61 61 } 62 62 -
trunk/src/org/openstreetmap/josm/command/Command.java
r1894 r2025 89 89 e.getKey().cloneFrom(e.getValue()); 90 90 } 91 getLayer().setModified(true);92 91 } 93 92 … … 114 113 if (o != null) 115 114 return o; 116 Main.debug("unable to find osm with id: " + osm. id+ " hashCode: " + osm.hashCode());115 Main.debug("unable to find osm with id: " + osm.getId() + " hashCode: " + osm.hashCode()); 117 116 for (OsmPrimitive t : cloneMap.keySet()) { 118 117 OsmPrimitive to = cloneMap.get(t); 119 Main.debug("now: " + t. id+ " hashCode: " + t.hashCode());120 Main.debug("orig: " + to. id+ " hashCode: " + to.hashCode());118 Main.debug("now: " + t.getId() + " hashCode: " + t.hashCode()); 119 Main.debug("orig: " + to.getId() + " hashCode: " + to.hashCode()); 121 120 } 122 121 return o; -
trunk/src/org/openstreetmap/josm/command/CoordinateConflictResolveCommand.java
r1954 r2025 45 45 return new DefaultMutableTreeNode( 46 46 new JLabel( 47 tr("Resolve conflicts in coordinates in {0}",conflict.getMy(). id),47 tr("Resolve conflicts in coordinates in {0}",conflict.getMy().getId()), 48 48 ImageProvider.get("data", "object"), 49 49 JLabel.HORIZONTAL -
trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
r1990 r2025 110 110 String msg = ""; 111 111 switch(OsmPrimitiveType.from(primitive)) { 112 case NODE: msg = "Delete node {0}"; break;113 case WAY: msg = "Delete way {0}"; break;114 case RELATION:msg = "Delete relation {0}"; break;112 case NODE: msg = "Delete node {0}"; break; 113 case WAY: msg = "Delete way {0}"; break; 114 case RELATION:msg = "Delete relation {0}"; break; 115 115 } 116 116 … … 131 131 apiname = t.getAPIName(); 132 132 switch(t) { 133 case NODE: msg = trn("Delete {0} node", "Delete {0} nodes", toDelete.size(), toDelete.size()); break;134 case WAY: msg = trn("Delete {0} way", "Delete {0} ways", toDelete.size(), toDelete.size()); break;135 case RELATION: msg = trn("Delete {0} relation", "Delete {0} relations", toDelete.size(), toDelete.size()); break;133 case NODE: msg = trn("Delete {0} node", "Delete {0} nodes", toDelete.size(), toDelete.size()); break; 134 case WAY: msg = trn("Delete {0} way", "Delete {0} ways", toDelete.size(), toDelete.size()); break; 135 case RELATION: msg = trn("Delete {0} relation", "Delete {0} relations", toDelete.size(), toDelete.size()); break; 136 136 } 137 137 } … … 355 355 } 356 356 Way w = (Way) primitive; 357 if (w. id== 0) { // new ways with id == 0 are fine,357 if (w.getId() == 0) { // new ways with id == 0 are fine, 358 358 continue; // process existing ways only 359 359 } … … 363 363 // nodes ... 364 364 for (Node n : wnew.getNodes()) { 365 if (n. id!= 0 || !primitivesToDelete.contains(n)) {365 if (n.getId() != 0 || !primitivesToDelete.contains(n)) { 366 366 nodesToKeep.add(n); 367 367 } … … 426 426 if (a != null) { 427 427 for (OsmPrimitive osm : primitivesToDelete) { 428 if (osm instanceof Node && osm. id!= 0) {428 if (osm instanceof Node && osm.getId() != 0) { 429 429 Node n = (Node) osm; 430 430 if (!a.contains(n.getCoor())) { -
trunk/src/org/openstreetmap/josm/command/DeletedStateConflictResolveCommand.java
r1954 r2025 45 45 return new DefaultMutableTreeNode( 46 46 new JLabel( 47 tr("Resolve conflicts in deleted state in {0}",conflict.getMy(). id),47 tr("Resolve conflicts in deleted state in {0}",conflict.getMy().getId()), 48 48 ImageProvider.get("data", "object"), 49 49 JLabel.HORIZONTAL … … 62 62 63 63 if (decision.equals(MergeDecisionType.KEEP_MINE)) { 64 if (conflict.getMy(). deleted) {64 if (conflict.getMy().isDeleted()) { 65 65 // because my was involved in a conflict it my still be referred 66 66 // to from a way or a relation. Fix this now. -
trunk/src/org/openstreetmap/josm/command/MoveCommand.java
r2017 r2025 69 69 OldState os = new OldState(); 70 70 os.latlon = new LatLon(n.getCoor()); 71 os.modified = n. modified;71 os.modified = n.isModified(); 72 72 oldState.add(os); 73 73 } … … 93 93 for (Node n : nodes) { 94 94 n.setEastNorth(n.getEastNorth().add(x, y)); 95 n. modified = true;95 n.setModified(true); 96 96 } 97 97 return true; … … 103 103 OldState os = it.next(); 104 104 n.setCoor(os.latlon); 105 n. modified = os.modified;105 n.setModified(os.modified); 106 106 } 107 107 }
Note:
See TracChangeset
for help on using the changeset viewer.