Ignore:
Timestamp:
2017-08-24T00:15:51+02:00 (9 years ago)
Author:
Don-vip
Message:

see #15182 - deprecate Main.map and Main.isDisplayingMapView(). Replacements: gui.MainApplication.getMap() / gui.MainApplication.isDisplayingMapView()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextArea.java

    r11308 r12630  
    99import javax.swing.text.Document;
    1010
    11 import org.openstreetmap.josm.Main;
     11import org.openstreetmap.josm.gui.MainApplication;
     12import org.openstreetmap.josm.gui.MapFrame;
    1213
    1314/**
     
    105106    @Override
    106107    public void focusGained(FocusEvent e) {
    107         if (Main.map != null) {
    108             Main.map.keyDetector.setEnabled(false);
     108        MapFrame map = MainApplication.getMap();
     109        if (map != null) {
     110            map.keyDetector.setEnabled(false);
    109111        }
    110112    }
     
    112114    @Override
    113115    public void focusLost(FocusEvent e) {
    114         if (Main.map != null) {
    115             Main.map.keyDetector.setEnabled(true);
     116        MapFrame map = MainApplication.getMap();
     117        if (map != null) {
     118            map.keyDetector.setEnabled(true);
    116119        }
    117120    }
Note: See TracChangeset for help on using the changeset viewer.