Changeset 10452 in josm for trunk/src/org/openstreetmap/josm/command
- Timestamp:
- 2016-06-21T23:41:42+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/command
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/Command.java
r10413 r10452 148 148 * Executes the command on the dataset. This implementation will remember all 149 149 * primitives returned by fillModifiedData for restoring them on undo. 150 * <p> 151 * The layer should be invalidated after execution so that it can be re-painted. 150 152 * @return true 153 * @see #invalidateAffectedLayers() 151 154 */ 152 155 public boolean executeCommand() { … … 300 303 Objects.equals(layer, command.layer); 301 304 } 305 306 /** 307 * Invalidate all layers that were affected by this command. 308 * @see Layer#invalidate() 309 */ 310 public void invalidateAffectedLayers() { 311 OsmDataLayer layer = getLayer(); 312 if (layer != null) { 313 layer.invalidate(); 314 } 315 } 302 316 } -
trunk/src/org/openstreetmap/josm/command/SequenceCommand.java
r9377 r10452 126 126 127 127 @Override 128 public void invalidateAffectedLayers() { 129 super.invalidateAffectedLayers(); 130 for (Command c : sequence) { 131 c.invalidateAffectedLayers(); 132 } 133 } 134 135 @Override 128 136 public int hashCode() { 129 137 return Objects.hash(super.hashCode(), Arrays.hashCode(sequence), sequenceComplete, name, continueOnError);
Note:
See TracChangeset
for help on using the changeset viewer.