Changeset 7587 in josm
- Timestamp:
- 2014-09-29T23:41:46+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/AddCommand.java
r6881 r7587 12 12 import org.openstreetmap.josm.data.osm.OsmPrimitive; 13 13 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 14 import org.openstreetmap.josm.data.osm.Way; 14 15 import org.openstreetmap.josm.gui.DefaultNameFormatter; 15 16 import org.openstreetmap.josm.gui.layer.OsmDataLayer; … … 48 49 } 49 50 51 protected static final void checkNodeStyles(OsmPrimitive osm) { 52 if (osm instanceof Way) { 53 // Fix #10557 - node icon not updated after undoing/redoing addition of a way 54 ((Way)osm).clearCachedNodeStyles(); 55 } 56 } 57 50 58 @Override 51 59 public boolean executeCommand() { 52 60 getLayer().data.addPrimitive(osm); 53 61 osm.setModified(true); 62 checkNodeStyles(osm); 54 63 return true; 55 64 } … … 58 67 public void undoCommand() { 59 68 getLayer().data.removePrimitive(osm); 69 checkNodeStyles(osm); 60 70 } 61 71 -
trunk/src/org/openstreetmap/josm/data/osm/Way.java
r7509 r7587 739 739 protected void keysChangedImpl(Map<String, String> originalKeys) { 740 740 super.keysChangedImpl(originalKeys); 741 clearCachedNodeStyles(); 742 } 743 744 public final void clearCachedNodeStyles() { 741 745 for (final Node n : nodes) { 742 746 n.clearCachedStyle(); 743 747 } 744 748 } 745 746 749 }
Note:
See TracChangeset
for help on using the changeset viewer.