Changeset 35705 in osm for applications


Ignore:
Timestamp:
2021-02-08T10:03:07+01:00 (4 years ago)
Author:
GerdP
Message:

fix #19936 CommandLine plugin (circle, arc) frequently crashes JOSM

  • remove code which tries to switch back to previous map mode
File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/CommandLine/src/org/openstreetmap/josm/plugins/commandline/CommandLine.java

    r34656 r35705  
    7575    protected History history;
    7676    protected MapFrame currentMapFrame;
    77     protected MapMode previousMode;
    7877
    7978    static final String pluginDir = Preferences.main().getPluginsDirectory().getAbsolutePath() + "/CommandLine/";
     
    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);
     
    331321    public void endInput() {
    332322        setMode(Mode.IDLE);
    333         MainApplication.getMap().selectMapMode(previousMode);
     323        MainApplication.getMap().selectMapMode(null);
    334324        MainApplication.getMap().mapView.repaint();
    335325    }
Note: See TracChangeset for help on using the changeset viewer.