Ignore:
Timestamp:
2016-06-18T00:06:41+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #12983 - replace calls to Main.main.get[Active|Edit]Layer() by Main.getLayerManager().get[Active|Edit]Layer() - gsoc-core

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java

    r10378 r10413  
    106106
    107107        if (Main.main != null) {
    108             OsmDataLayer editLayer = Main.main.getEditLayer();
     108            OsmDataLayer editLayer = Main.getLayerManager().getEditLayer();
    109109            if (editLayer != null) {
    110110                editLayer.data.addDataSetListener(this);
     
    174174        if (history.getNumVersions() > 0) {
    175175            HistoryOsmPrimitive newLatest = null;
    176             OsmDataLayer editLayer = Main.main.getEditLayer();
     176            OsmDataLayer editLayer = Main.getLayerManager().getEditLayer();
    177177            if (editLayer != null) {
    178178                OsmPrimitive p = editLayer.data.getPrimitiveById(history.getId(), history.getType());
     
    532532            if (latest == null)
    533533                return null;
    534             OsmDataLayer editLayer = Main.main.getEditLayer();
     534            OsmDataLayer editLayer = Main.getLayerManager().getEditLayer();
    535535            if (editLayer == null)
    536536                return null;
     
    666666     */
    667667    public void unlinkAsListener() {
    668         OsmDataLayer editLayer = Main.main.getEditLayer();
     668        OsmDataLayer editLayer = Main.getLayerManager().getEditLayer();
    669669        if (editLayer != null) {
    670670            editLayer.data.removeDataSetListener(this);
Note: See TracChangeset for help on using the changeset viewer.