Changeset 10930 in josm for trunk


Ignore:
Timestamp:
2016-09-02T14:22:48+02:00 (3 years ago)
Author:
michael2402
Message:

Fix #13512: Do not attempt to restore old map mode when imagery dialog change was caused by map mode change.

File:
1 edited

Legend:

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

    r10688 r10930  
    9292            }
    9393            offsetDialog.setVisible(false);
     94            // do not restore old mode here - this is called when the new mode is already known.
    9495            offsetDialog = null;
    9596        }
     
    301302            }
    302303            Main.main.menu.imageryMenu.refreshOffsetMenu();
     304        }
     305
     306        private void restoreMapModeState() {
    303307            if (Main.map == null)
    304308                return;
    305             if (oldMapMode != null) {
     309            if (oldMapMode != null ) {
    306310                Main.map.selectMapMode(oldMapMode);
    307311                oldMapMode = null;
     
    315319            public void windowClosing(WindowEvent e) {
    316320                setVisible(false);
     321                restoreMapModeState();
    317322            }
    318323        }
Note: See TracChangeset for help on using the changeset viewer.