Changeset 29151 in osm


Ignore:
Timestamp:
2012-12-31T22:44:33+01:00 (12 years ago)
Author:
malcolmh
Message:

save

Location:
applications/editors/josm/plugins/smed2/src
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed2/src/smed2/Smed2Action.java

    r29150 r29151  
    4646        public static PanelMain panelMain = null;
    4747        public ImageryLayer rendering;
     48        public Collection<OsmPrimitive> data = null;
    4849
    4950        private final DataSetListener dataSetListener = new DataSetListener() {
     
    9293        public Smed2Action() {
    9394                super(editor, "Smed2", editor, null, true);
    94                 MapView.addEditLayerChangeListener(this); // DataSet.addDataSetListener(DataListener);
     95                MapView.addEditLayerChangeListener(this);
    9596                DataSet.addSelectionListener(this);
    9697        }
     
    145146        @Override
    146147        public void editLayerChanged(OsmDataLayer oldLayer, OsmDataLayer newLayer) {
     148                System.out.println(newLayer);
    147149                if (oldLayer != null) {
    148150                        oldLayer.data.removeDataSetListener(dataSetListener);
     
    151153                if (newLayer != null) {
    152154                        newLayer.data.addDataSetListener(dataSetListener);
     155                        data = newLayer.data.allPrimitives();
     156                } else {
     157                        data = null;
    153158                }
    154159        }
Note: See TracChangeset for help on using the changeset viewer.