Ticket #19936: 19936.patch

File 19936.patch, 1.5 KB (added by GerdP, 5 years ago)
  • src/org/openstreetmap/josm/plugins/commandline/CommandLine.java

     
    7474    protected String commandSymbol;
    7575    protected History history;
    7676    protected MapFrame currentMapFrame;
    77     protected MapMode previousMode;
    7877
    7978    static final String pluginDir = Preferences.main().getPluginsDirectory().getAbsolutePath() + "/CommandLine/";
    8079
     
    112111        currentCommand = command;
    113112        currentCommand.resetLoading();
    114113        parseSelection(ds.getSelected());
    115         if (!(map.mapMode instanceof AnyAction
    116            || map.mapMode instanceof DummyAction
    117            || map.mapMode instanceof LengthAction
    118            || map.mapMode instanceof NodeAction
    119            || map.mapMode instanceof PointAction
    120            || map.mapMode instanceof RelationAction
    121            || map.mapMode instanceof WayAction)) {
    122             previousMode = map.mapMode;
    123         }
    124114        if (currentCommand.currentParameterNum < currentCommand.parameters.size())
    125115            setMode(Mode.SELECTION);
    126116        else
     
    330320
    331321    public void endInput() {
    332322        setMode(Mode.IDLE);
    333         MainApplication.getMap().selectMapMode(previousMode);
     323        MainApplication.getMap().selectMapMode(null);
    334324        MainApplication.getMap().mapView.repaint();
    335325    }
    336326