Changeset 12835 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2017-09-12T23:03:55+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15229 - see #15182 - remove GUI references from TaggingPresetItem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItem.java

    r12758 r12835  
    1818
    1919import org.openstreetmap.josm.Main;
     20import org.openstreetmap.josm.data.osm.DataSet;
    2021import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2122import org.openstreetmap.josm.data.osm.Tag;
    22 import org.openstreetmap.josm.gui.MainApplication;
    23 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    2423import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingTextField;
    2524import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionList;
     
    4443    protected void initAutoCompletionField(AutoCompletingTextField field, List<String> keys) {
    4544        if (Main.main == null) return;
    46         OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer();
    47         if (layer == null) {
     45        DataSet data = Main.main.getEditDataSet();
     46        if (data == null) {
    4847            return;
    4948        }
    5049        AutoCompletionList list = new AutoCompletionList();
    51         AutoCompletionManager.of(layer.data).populateWithTagValues(list, keys);
     50        AutoCompletionManager.of(data).populateWithTagValues(list, keys);
    5251        field.setAutoCompletionList(list);
    5352    }
Note: See TracChangeset for help on using the changeset viewer.