Ignore:
Timestamp:
2018-06-13T01:33:47+02:00 (11 months ago)
Author:
Don-vip
Message:

add AbstractOsmDataLayer, MainLayerManager.getActiveData, Main.getInProgressISelection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java

    r13434 r13926  
    2222
    2323import org.openstreetmap.josm.actions.AutoScaleAction;
    24 import org.openstreetmap.josm.data.osm.DataSet;
     24import org.openstreetmap.josm.data.osm.IPrimitive;
     25import org.openstreetmap.josm.data.osm.OsmData;
    2526import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2627import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
     
    247248            if (!isEnabled())
    248249                return;
    249             OsmPrimitive p = getPrimitiveToZoom();
     250            IPrimitive p = getPrimitiveToZoom();
    250251            if (p != null) {
    251                 DataSet ds = MainApplication.getLayerManager().getActiveDataSet();
     252                OsmData<?, ?, ?, ?> ds = MainApplication.getLayerManager().getActiveData();
    252253                if (ds != null) {
    253254                    ds.setSelected(p.getPrimitiveId());
     
    262263        }
    263264
    264         protected OsmPrimitive getPrimitiveToZoom() {
     265        protected IPrimitive getPrimitiveToZoom() {
    265266            if (primitiveId == null)
    266267                return null;
    267             DataSet ds = MainApplication.getLayerManager().getActiveDataSet();
     268            OsmData<?, ?, ?, ?> ds = MainApplication.getLayerManager().getActiveData();
    268269            if (ds == null)
    269270                return null;
     
    272273
    273274        public void updateEnabledState() {
    274             setEnabled(MainApplication.getLayerManager().getActiveDataSet() != null && getPrimitiveToZoom() != null);
     275            setEnabled(MainApplication.getLayerManager().getActiveData() != null && getPrimitiveToZoom() != null);
    275276        }
    276277    }
Note: See TracChangeset for help on using the changeset viewer.