Ignore:
Timestamp:
2017-11-21T01:21:39+01:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12743

Location:
applications/editors/josm/plugins/irsrectify
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/irsrectify/build.xml

    r32680 r33846  
    55    <property name="commit.message" value="irsrectify shortcut conflict"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="10580"/>
     7    <property name="plugin.main.version" value="12743"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/irsrectify/src/irsrectify/IRSRectifyPlugin.java

    r32469 r33846  
    1515import org.openstreetmap.josm.data.osm.Node;
    1616import org.openstreetmap.josm.data.osm.Way;
    17 import org.openstreetmap.josm.gui.JosmUserIdentityManager;
     17import org.openstreetmap.josm.data.UserIdentityManager;
     18import org.openstreetmap.josm.gui.MainApplication;
    1819import org.openstreetmap.josm.gui.MapFrame;
    1920import org.openstreetmap.josm.gui.layer.ImageryLayer;
     
    3132    public IRSRectifyPlugin(PluginInformation info) {
    3233        super(info);
    33         Main.main.menu.toolsMenu.add(new IRSRectifyAction());
     34        MainApplication.getMenu().toolsMenu.add(new IRSRectifyAction());
    3435    }
    3536
     
    6566            way.addNode(offset);
    6667            way.put("timestamp", new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
    67             String userName = JosmUserIdentityManager.getInstance().getUserName();
     68            String userName = UserIdentityManager.getInstance().getUserName();
    6869            if( userName != null )
    6970                way.put("user", userName);
     
    7475            data.data.addPrimitive(way);
    7576            data.data.setSelected(way.getPrimitiveId());
    76             Main.getLayerManager().setActiveLayer(data);
     77            MainApplication.getLayerManager().setActiveLayer(data);
    7778        }
    7879
     
    8081            if( frame == null || frame.mapView == null )
    8182                return null;
    82             for( Layer l : Main.getLayerManager().getLayers() )
     83            for( Layer l : MainApplication.getLayerManager().getLayers() )
    8384                if( l instanceof ImageryLayer )
    8485                    return (ImageryLayer)l;
     
    9091                return null;
    9192
    92             OsmDataLayer l = Main.getLayerManager().getEditLayer();
     93            OsmDataLayer l = MainApplication.getLayerManager().getEditLayer();
    9394            if( isOffsetLayer(l) )
    9495                return l;
    9596
    9697            // try to find among all layers
    97             for( Layer layer : Main.getLayerManager().getLayers() )
     98            for( Layer layer : MainApplication.getLayerManager().getLayers() )
    9899                if( layer instanceof OsmDataLayer && isOffsetLayer((OsmDataLayer)layer) )
    99100                    return (OsmDataLayer) layer;
     
    104105                name = name + " " + newLayerNameCounter;
    105106            l = new OsmDataLayer(new DataSet(), name, null);
    106             Main.getLayerManager().addLayer(l);
     107            MainApplication.getLayerManager().addLayer(l);
    107108            return l;
    108109        }
Note: See TracChangeset for help on using the changeset viewer.