Ignore:
Timestamp:
2018-08-11T23:33:58+02:00 (2 months 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/RedoAction.java

    r12718 r14134  
    99
    1010import org.openstreetmap.josm.Main;
     11import org.openstreetmap.josm.data.UndoRedoHandler;
    1112import org.openstreetmap.josm.data.UndoRedoHandler.CommandQueueListener;
    1213import org.openstreetmap.josm.gui.MainApplication;
     
    3738            return;
    3839        map.repaint();
    39         MainApplication.undoRedo.redo();
     40        UndoRedoHandler.getInstance().redo();
    4041    }
    4142
    4243    @Override
    4344    protected void updateEnabledState() {
    44         setEnabled(Main.main != null && !MainApplication.undoRedo.redoCommands.isEmpty());
     45        setEnabled(Main.main != null && !UndoRedoHandler.getInstance().redoCommands.isEmpty());
    4546    }
    4647
    4748    @Override
    4849    public void commandChanged(int queueSize, int redoSize) {
    49         if (MainApplication.undoRedo.redoCommands.isEmpty()) {
     50        if (UndoRedoHandler.getInstance().redoCommands.isEmpty()) {
    5051            putValue(NAME, tr("Redo"));
    5152            setTooltip(tr("Redo the last undone action."));
     
    5354            putValue(NAME, tr("Redo ..."));
    5455            setTooltip(tr("Redo {0}",
    55                     MainApplication.undoRedo.redoCommands.getFirst().getDescriptionText()));
     56                    UndoRedoHandler.getInstance().redoCommands.getFirst().getDescriptionText()));
    5657        }
    5758    }
Note: See TracChangeset for help on using the changeset viewer.