Changeset 32508 in osm


Ignore:
Timestamp:
2016-07-02T00:02:19+02:00 (8 years ago)
Author:
donvip
Message:

remove calls to deprecated methods

Location:
applications/editors/josm/plugins/tageditor
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/tageditor/build.xml

    r31923 r32508  
    22<project name="tageditor" default="dist" basedir=".">
    33    <property name="commit.message" value="Tageditor:  help shortcut parser, rebuild"/>
    4     <property name="plugin.main.version" value="8863"/>
     4    <property name="plugin.main.version" value="10279"/>
    55   
    66        <property name="plugin.author" value="Karl Guggisberg"/>
  • applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/TagEditorDialog.java

    r31615 r32508  
    278278        tagEditor.getModel().clearAppliedPresets();
    279279        tagEditor.getModel().initFromJOSMSelection();
    280         autocomplete = Main.main.getEditLayer().data.getAutoCompletionManager();
     280        autocomplete = Main.getLayerManager().getEditLayer().data.getAutoCompletionManager();
    281281        tagEditor.setAutoCompletionManager(autocomplete);
    282282        getModel().ensureOneTag();
     
    313313            setVisible(false);
    314314            tagEditor.getModel().updateJOSMSelection();
    315             DataSet ds = Main.main.getCurrentDataSet();
     315            DataSet ds = Main.getLayerManager().getEditDataSet();
    316316            ds.fireSelectionChanged();
    317317            Main.parent.repaint(); // repaint all - drawing could have been changed
  • applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionContext.java

    r30488 r32508  
    33
    44import org.openstreetmap.josm.Main;
     5import org.openstreetmap.josm.data.osm.DataSet;
    56
    67public class AutoCompletionContext {
     
    1516
    1617    public void initFromJOSMSelection() {
    17         selectionIncludesNodes = ! Main.main.getCurrentDataSet().getSelectedNodes().isEmpty();
    18         selectionIncludesWays = !Main.main.getCurrentDataSet().getSelectedWays().isEmpty();
    19         selectionIncludesRelations = !Main.main.getCurrentDataSet().getSelectedRelations().isEmpty();
    20         selectionEmpty = (Main.main.getCurrentDataSet().getSelected().size() == 0);
     18        DataSet ds = Main.getLayerManager().getEditDataSet();
     19        selectionIncludesNodes = !ds.getSelectedNodes().isEmpty();
     20        selectionIncludesWays = !ds.getSelectedWays().isEmpty();
     21        selectionIncludesRelations = !ds.getSelectedRelations().isEmpty();
     22        selectionEmpty = ds.getSelected().isEmpty();
    2123    }
    2224
  • applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/editor/TagEditorModel.java

    r31615 r32508  
    148148    public void updateJOSMSelection() {
    149149        ArrayList<Command> commands = new ArrayList<>();
    150         Collection<OsmPrimitive> selection = Main.main.getCurrentDataSet().getSelected();
     150        Collection<OsmPrimitive> selection = Main.getLayerManager().getEditDataSet().getSelected();
    151151        if (selection == null)
    152152            return;
     
    175175     */
    176176    public void initFromJOSMSelection() {
    177         Collection<OsmPrimitive> selection = Main.main.getCurrentDataSet().getSelected();
     177        Collection<OsmPrimitive> selection = Main.getLayerManager().getEditDataSet().getSelected();
    178178        clear();
    179179        for (OsmPrimitive element : selection) {
Note: See TracChangeset for help on using the changeset viewer.