Ignore:
Timestamp:
2016-06-18T00:06:41+02:00 (3 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

Location:
trunk/src/org/openstreetmap/josm/gui/history
Files:
3 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);
  • trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java

    r10210 r10413  
    243243            OsmPrimitive p = getPrimitiveToZoom();
    244244            if (p != null) {
    245                 OsmDataLayer editLayer = Main.main.getEditLayer();
     245                OsmDataLayer editLayer = Main.getLayerManager().getEditLayer();
    246246                if (editLayer != null) {
    247247                    editLayer.data.setSelected(p.getPrimitiveId());
     
    259259            if (primitiveId == null)
    260260                return null;
    261             OsmDataLayer editLayer = Main.main.getEditLayer();
     261            OsmDataLayer editLayer = Main.getLayerManager().getEditLayer();
    262262            if (editLayer == null)
    263263                return null;
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r10378 r10413  
    149149        String text;
    150150        if (isLatest) {
    151             OsmDataLayer editLayer = Main.main.getEditLayer();
     151            OsmDataLayer editLayer = Main.getLayerManager().getEditLayer();
    152152            text = tr("<html>Version <strong>{0}</strong> currently edited in layer ''{1}''</html>",
    153153                    Long.toString(version),
Note: See TracChangeset for help on using the changeset viewer.