Ignore:
Timestamp:
2018-08-11T23:33:58+02:00 (6 years ago)
Author:
Don-vip
Message:

see #15229 - deprecate Main*.undoRedo - make UndoRedoHandler a singleton

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java

    r13434 r14134  
    1515import org.openstreetmap.josm.command.Command;
    1616import org.openstreetmap.josm.command.DeleteCommand;
     17import org.openstreetmap.josm.data.UndoRedoHandler;
    1718import org.openstreetmap.josm.data.osm.DataSet;
    1819import org.openstreetmap.josm.data.osm.Node;
     
    157158        // if c is null, an error occurred or the user aborted. Don't do anything in that case.
    158159        if (c != null) {
    159             MainApplication.undoRedo.add(c);
     160            UndoRedoHandler.getInstance().add(c);
    160161            //FIXME: This should not be required, DeleteCommand should update the selection, otherwise undo/redo won't work.
    161162            lm.getEditDataSet().setSelected();
     
    304305        Command c = buildDeleteCommands(e, e.getModifiersEx(), false);
    305306        if (c != null) {
    306             MainApplication.undoRedo.add(c);
     307            UndoRedoHandler.getInstance().add(c);
    307308        }
    308309
     
    355356        if (cmd != null) {
    356357            // cmd can be null if the user cancels dialogs DialogCommand displays
    357             MainApplication.undoRedo.add(cmd);
     358            UndoRedoHandler.getInstance().add(cmd);
    358359            for (Relation relation : toDelete) {
    359360                if (layer.data.getSelectedRelations().contains(relation)) {
Note: See TracChangeset for help on using the changeset viewer.