Changeset 34116 in osm for applications
- Timestamp:
- 2018-03-25T17:20:53+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/opendata
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/build.xml
r33790 r34116 12 12 <!-- ** include targets that all plugins have in common ** --> 13 13 <import file="../build-common.xml"/> 14 14 15 15 <fileset id="plugin.requires.jars" dir="${plugin.dist.dir}"> 16 16 <include name="apache-commons.jar"/> -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/gui/OdDialog.java
r33518 r34116 76 76 @Override 77 77 public void actionPerformed(ActionEvent e) { 78 if (MainApplication.getLayerManager().getEditLayer() instanceof OdLayer) { 79 dataLayer.makeDiff(); 80 } 78 // TODO 81 79 } 82 80 } … … 146 144 if (dataLayer.osmLayer == null) { 147 145 downloadButton.setEnabled(true); 148 } else if (dataLayer.diffLayer == null) {149 diffButton.setEnabled(true);150 146 } 151 147 toolsButton.setEnabled(dataLayer.handler != null && !dataLayer.handler.getTools().isEmpty()); -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/layers/OdDataLayer.java
r33518 r34116 34 34 public class OdDataLayer extends OsmDataLayer implements OdLayer, LayerChangeListener, ActiveLayerChangeListener { 35 35 36 public OdDiffLayer diffLayer;37 36 public OdOsmDataLayer osmLayer; 38 37 … … 75 74 } 76 75 77 public void addDiffLayer(OdDiffLayer layer) {78 removeDiffLayer();79 diffLayer = layer;80 MainApplication.getLayerManager().addLayer(diffLayer);81 }82 83 public void removeDiffLayer() {84 if (diffLayer != null) {85 MainApplication.getLayerManager().removeLayer(diffLayer);86 diffLayer = null;87 }88 }89 90 76 public final void downloadOsmData() { 91 77 if (handler != null) { … … 123 109 if (e.getRemovedLayer() == this) { 124 110 removeOsmLayer(); 125 removeDiffLayer();126 111 } else if (e.getRemovedLayer() == osmLayer) { 127 112 osmLayer = null; 128 } else if (e.getRemovedLayer() == diffLayer) {129 diffLayer = null;130 113 } 131 114 } … … 180 163 return this; 181 164 } 182 183 public void makeDiff() {184 final OdDiffLayer layer = new OdDiffLayer(this, getName()+"/Diff");185 addDiffLayer(layer);186 MainApplication.getLayerManager().setActiveLayer(diffLayer);187 }188 165 }
Note:
See TracChangeset
for help on using the changeset viewer.