Changeset 32475 in osm for applications/editors/josm
- Timestamp:
- 2016-06-30T23:48:10+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/public_transport_layer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/public_transport_layer/build.xml
r31932 r32475 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <!--3 ** Usage4 ** =====5 ** Call "ant help" to get possible build targets.6 -->7 2 <project name="public_transport_layer" default="dist" basedir="."> 8 3 9 4 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 10 <property name="plugin.main.version" value=" 9278"/>5 <property name="plugin.main.version" value="10353"/> 11 6 12 7 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/public_transport_layer/src/ptl/DistanceBetweenStops.java
r32142 r32475 52 52 for (int i = 0; i < links.size(); i++) { 53 53 final WayConnectionType link = links.get(i); 54 final WayConnectionType.Direction direction = link.direction;55 54 final List<Node> nodes = routeSegments.get(i).getWay().getNodes(); 56 55 switch (link.direction) { … … 131 130 @Override 132 131 public void actionPerformed(ActionEvent e) { 133 if (get CurrentDataSet() == null) {132 if (getLayerManager().getEditDataSet() == null) { 134 133 return; 135 134 } 136 135 final StringBuilder sb = new StringBuilder(); 137 for (Relation relation : get CurrentDataSet().getSelectedRelations()) {136 for (Relation relation : getLayerManager().getEditDataSet().getSelectedRelations()) { 138 137 if (!isRouteSupported(relation)) { 139 138 JOptionPane.showMessageDialog(Main.parent, "<html>" + tr("A valid public_transport:version=2 route is required") -
applications/editors/josm/plugins/public_transport_layer/src/ptl/PublicTransportLayer.java
r31932 r32475 46 46 @Override 47 47 public void paint(Graphics2D g, MapView mv, Bounds box) { 48 if (mv == null || mv.get EditLayer() == null || mv.getEditLayer().data.selectionEmpty()) {48 if (mv == null || mv.getLayerManager().getEditLayer() == null || mv.getLayerManager().getEditLayer().data.selectionEmpty()) { 49 49 return; 50 50 } 51 51 final StyledMapRenderer renderer = new StyledMapRenderer(g, mv, false); 52 52 53 final Collection<Relation> selectedRelations = mv.get EditLayer().data.getSelectedRelations();53 final Collection<Relation> selectedRelations = mv.getLayerManager().getEditLayer().data.getSelectedRelations(); 54 54 final MultiMap<Pair<Node, Node>, String> segmentRefs = new MultiMap<>(); 55 55 for (final Relation relation : selectedRelations) { … … 151 151 @Override 152 152 public void actionPerformed(ActionEvent e) { 153 Main. main.addLayer(new PublicTransportLayer());153 Main.getLayerManager().addLayer(new PublicTransportLayer()); 154 154 } 155 155 }
Note:
See TracChangeset
for help on using the changeset viewer.