Ignore:
Timestamp:
2012-12-05T22:52:19+01:00 (7 years ago)
Author:
Don-vip
Message:

see #6178 - Makes DeleteCommand use ChangeNodesCommand instead of ChangeCommand when deleting a node being part of a way.

The previous use of ChangeCommand prevented this use case to work as expected:

  • SequenceCommand of:
    • ChangePropertyCommands adding tags to a way
    • DeleteCommand of a node of this way


-> Running the DeleteCommand did cancel the previously run ChangePropertyCommands as the entire way was replaced (including its tags), based on the way state at the creation of the SequenceCommand and not its real current state.

By the way, this could also be more efficient.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/DeleteCommand.java

    r5409 r5612  
    368368                primitivesToDelete.add(w);
    369369            } else {
    370                 cmds.add(new ChangeCommand(w, wnew));
     370                cmds.add(new ChangeNodesCommand(w, wnew.getNodes()));
    371371            }
    372372        }
Note: See TracChangeset for help on using the changeset viewer.