Changeset 32480 in osm for applications/editors/josm/plugins/sds/src/org
- Timestamp:
- 2016-07-01T09:38:10+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsLoadAction.java
r30738 r32480 81 81 try { 82 82 fileStream = new FileInputStream(f); 83 SdsParser p = new SdsParser( Main.main.getCurrentDataSet(), plugin, false);83 SdsParser p = new SdsParser(getLayerManager().getEditDataSet(), plugin, false); 84 84 InputSource inputSource = new InputSource(fileStream); 85 85 SAXParserFactory.newInstance().newSAXParser().parse(inputSource, p); -
applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsMenu.java
r32329 r32480 21 21 import org.openstreetmap.josm.actions.JosmAction; 22 22 import org.openstreetmap.josm.gui.MainMenu; 23 import org.openstreetmap.josm.gui.MapView; 24 import org.openstreetmap.josm.gui.MapView.LayerChangeListener; 25 import org.openstreetmap.josm.gui.layer.Layer; 23 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent; 24 import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener; 25 import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent; 26 import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent; 27 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent; 28 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener; 26 29 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 27 30 import org.openstreetmap.josm.gui.preferences.PreferenceDialog; 28 31 29 32 @SuppressWarnings("serial") 30 public class SdsMenu extends JMenu implements LayerChangeListener {33 public class SdsMenu extends JMenu implements LayerChangeListener, ActiveLayerChangeListener { 31 34 32 35 private JMenuItem saveItem; … … 50 53 menu.add(aboutItem); 51 54 52 MapView.addLayerChangeListener(this); 55 Main.getLayerManager().addLayerChangeListener(this); 56 Main.getLayerManager().addActiveLayerChangeListener(this); 53 57 setEnabledState(); 54 58 } … … 61 65 62 66 @Override 63 public void active LayerChange(Layer oldLayer, Layer newLayer) { setEnabledState(); }67 public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) { setEnabledState(); } 64 68 65 69 @Override 66 public void layer Added(Layer newLayer) { setEnabledState();}70 public void layerOrderChanged(LayerOrderChangeEvent e) { } 67 71 68 72 @Override 69 public void layerRemoved(Layer oldLayer) { setEnabledState(); } 73 public void layerAdded(LayerAddEvent e) { setEnabledState(); } 74 75 @Override 76 public void layerRemoving(LayerRemoveEvent e) { setEnabledState(); } 70 77 71 78 private class SdsAboutAction extends JosmAction {
Note:
See TracChangeset
for help on using the changeset viewer.