Changeset 32426 in osm


Ignore:
Timestamp:
2016-06-28T23:24:50+02:00 (9 years ago)
Author:
donvip
Message:

remove calls to deprecated methods

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

Legend:

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

    r31923 r32426  
    22<project name="terracer" default="dist" basedir=".">
    33    <property name="commit.message" value="applied #j5760 (patch by robome) - Order of housenumbers not correct"/>
    4     <property name="plugin.main.version" value="8919"/>
     4    <property name="plugin.main.version" value="10279"/>
    55    <property name="plugin.author" value="Matt Amos"/>
    66    <property name="plugin.class" value="terracer.TerracerPlugin"/>
  • applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputDialog.java

    r30872 r32426  
    315315
    316316        if (buildingComboBox == null) {
    317             final List<AutoCompletionListItem> values = Main.main.getCurrentDataSet().getAutoCompletionManager().getValues("building");
     317            final List<AutoCompletionListItem> values = Main.getLayerManager().getEditDataSet().getAutoCompletionManager().getValues("building");
    318318
    319319            buildingComboBox = new AutoCompletingComboBox();
     
    367367    TreeSet<String> createAutoCompletionInfo() {
    368368        final TreeSet<String> names = new TreeSet<>();
    369         for (OsmPrimitive osm : Main.main.getCurrentDataSet()
     369        for (OsmPrimitive osm : Main.getLayerManager().getEditDataSet()
    370370                .allNonDeletedPrimitives()) {
    371371            if (osm.getKeys() != null && osm.keySet().contains("highway")
  • applications/editors/josm/plugins/terracer/src/terracer/ReverseTerraceAction.java

    r30737 r32426  
    5151     */
    5252    public void actionPerformed(ActionEvent e) {
    53         Collection<Way> selectedWays = Main.main.getCurrentDataSet().getSelectedWays();
     53        Collection<Way> selectedWays = Main.getLayerManager().getEditDataSet().getSelectedWays();
    5454
    5555        // Set to keep track of all the nodes that have been visited - that is: if
     
    123123
    124124        Main.main.undoRedo.add(new SequenceCommand(tr("Reverse Terrace"), commands));
    125         Main.main.getCurrentDataSet().setSelected(orderedWays);
     125        Main.getLayerManager().getEditDataSet().setSelected(orderedWays);
    126126    }
    127127
    128128    @Override
    129129    protected void updateEnabledState() {
    130         setEnabled(getCurrentDataSet() != null);
     130        setEnabled(getLayerManager().getEditDataSet() != null);
    131131    }
    132132}
  • applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java

    r31655 r32426  
    109109    @Override
    110110    public void actionPerformed(ActionEvent e) {
    111         Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
     111        Collection<OsmPrimitive> sel = getLayerManager().getEditDataSet().getSelected();
    112112        Way outline = null;
    113113        Way street = null;
     
    404404                        nodesToDelete.add(n);
    405405                if (!nodesToDelete.isEmpty())
    406                     this.commands.add(DeleteCommand.delete(Main.main.getEditLayer(), nodesToDelete));
     406                    this.commands.add(DeleteCommand.delete(Main.getLayerManager().getEditLayer(), nodesToDelete));
    407407            }
    408408        } else {
     
    414414        // Or should removing them also be an option?
    415415        if (!housenumbers.isEmpty()) {
    416             commands.add(DeleteCommand.delete(Main.main.getEditLayer(),
     416            commands.add(DeleteCommand.delete(Main.getLayerManager().getEditLayer(),
    417417                    housenumbers, true, true));
    418418        }
     
    429429        if (nb <= 1 && street != null) {
    430430            // Select the way (for quick selection of a new house (with the same way))
    431             Main.main.getCurrentDataSet().setSelected(street);
     431            Main.getLayerManager().getEditDataSet().setSelected(street);
    432432        } else {
    433433            // Select the new building outlines (for quick reversing)
    434             Main.main.getCurrentDataSet().setSelected(ways);
     434            Main.getLayerManager().getEditDataSet().setSelected(ways);
    435435        }
    436436    }
     
    777777    @Override
    778778    protected void updateEnabledState() {
    779         setEnabled(getCurrentDataSet() != null);
     779        setEnabled(getLayerManager().getEditDataSet() != null);
    780780    }
    781781}
Note: See TracChangeset for help on using the changeset viewer.