Changeset 13847 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2018-05-26T18:21:19+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #16302 - IAE when switching map mode while offset dialog is open

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
2 edited

Legend:

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

    r13797 r13847  
    371371                return;
    372372            if (oldMapMode != null) {
    373                 if (restoreOldMode || getValue() == ExtendedDialog.DialogClosedOtherwise) {
     373                if (restoreOldMode || (!exitingMode && getValue() == ExtendedDialog.DialogClosedOtherwise)) {
    374374                    map.selectMapMode(oldMapMode);
    375375                }
  • trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java

    r13453 r13847  
    1010import java.util.Collection;
    1111import java.util.Collections;
     12
     13import javax.swing.Action;
    1214
    1315import org.openstreetmap.josm.actions.JosmAction;
     
    2123import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;
    2224import org.openstreetmap.josm.tools.ImageProvider;
     25import org.openstreetmap.josm.tools.Logging;
    2326import org.openstreetmap.josm.tools.Shortcut;
    2427
     
    6972     */
    7073    public void enterMode() {
     74        Logging.debug("Entering map mode: {0}", getValue(Action.NAME));
    7175        putValue("active", Boolean.TRUE);
    7276        Config.getPref().addPreferenceChangeListener(this);
     
    8084     */
    8185    public void exitMode() {
     86        Logging.debug("Exiting map mode: {0}", getValue(Action.NAME));
    8287        putValue("active", Boolean.FALSE);
    8388        Config.getPref().removePreferenceChangeListener(this);
Note: See TracChangeset for help on using the changeset viewer.