Ignore:
Timestamp:
2017-08-24T00:15:51+02:00 (7 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/actions/search/SearchAction.java

    r12620 r12630  
    5151import org.openstreetmap.josm.data.osm.OsmPrimitive;
    5252import org.openstreetmap.josm.gui.ExtendedDialog;
     53import org.openstreetmap.josm.gui.MainApplication;
     54import org.openstreetmap.josm.gui.MapFrame;
    5355import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    5456import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSException;
     
    696698        public void receiveSearchResult(DataSet ds, Collection<OsmPrimitive> result, int foundMatches, SearchSetting setting) {
    697699            ds.setSelected(result);
     700            MapFrame map = MainApplication.getMap();
    698701            if (foundMatches == 0) {
    699702                final String msg;
     
    710713                    msg = null;
    711714                }
    712                 if (Main.map != null) {
    713                     Main.map.statusLine.setHelpText(msg);
     715                if (map != null) {
     716                    map.statusLine.setHelpText(msg);
    714717                }
    715718                if (!GraphicsEnvironment.isHeadless()) {
     
    722725                }
    723726            } else {
    724                 Main.map.statusLine.setHelpText(tr("Found {0} matches", foundMatches));
     727                map.statusLine.setHelpText(tr("Found {0} matches", foundMatches));
    725728            }
    726729        }
Note: See TracChangeset for help on using the changeset viewer.