Changeset 32444 in osm


Ignore:
Timestamp:
2016-06-29T21:08:08+02:00 (8 years ago)
Author:
donvip
Message:

remove calls to deprecated methods

Location:
applications/editors/josm/plugins/FastDraw
Files:
2 edited

Legend:

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

    r31926 r32444  
    44    <property name="commit.message" value="[josm_fastdraw] Fix incorrect settings saving-2"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="7609"/>
     6    <property name="plugin.main.version" value="10353"/>
    77   
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java

    r31224 r32444  
    66 */
    77package org.openstreetmap.josm.plugins.fastdraw;
     8
     9import static org.openstreetmap.josm.tools.I18n.tr;
    810
    911import java.awt.Color;
     
    1517import java.util.ArrayList;
    1618import java.util.Collection;
    17 import java.util.Collections;
    1819import java.util.HashSet;
    1920import java.util.Iterator;
     
    2223import java.util.Map;
    2324import java.util.Set;
     25
    2426import javax.swing.JOptionPane;
    2527
     
    4648import org.openstreetmap.josm.gui.util.KeyPressReleaseListener;
    4749import org.openstreetmap.josm.gui.util.ModifierListener;
    48 import static org.openstreetmap.josm.tools.I18n.tr;
    4950import org.openstreetmap.josm.tools.ImageProvider;
    5051import org.openstreetmap.josm.tools.Shortcut;
     
    110111        line.setMv(mv);
    111112       
    112         if (getCurrentDataSet() == null) return;
     113        if (getLayerManager().getEditDataSet() == null) return;
    113114
    114115        Main.map.mapView.addMouseListener(this);
     
    145146    @Override
    146147    protected void updateEnabledState() {
    147         setEnabled(getEditLayer() != null);
     148        setEnabled(getLayerManager().getEditLayer() != null);
    148149    }
    149150
     
    593594        } else cmds.add(new AddCommand(w));
    594595        Command c = new SequenceCommand(tr("Draw the way by mouse"), cmds);
    595         if (!Main.main.hasEditLayer()) return;
     596        if (getLayerManager().getEditLayer() == null) return;
    596597        Main.main.undoRedo.add(c);
    597598        lineWasSaved = true;
     
    600601            // Select this way and switch drawing mode off
    601602            exitMode();
    602             getCurrentDataSet().setSelected(w);
     603            getLayerManager().getEditDataSet().setSelected(w);
    603604            Main.map.selectSelectTool(false);
    604605        }
     
    691692    private void tryToLoadWay() {
    692693        updateCursor();
    693         Collection<Way> selectedWays = Main.main.getCurrentDataSet().getSelectedWays();
     694        Collection<Way> selectedWays = Main.getLayerManager().getEditDataSet().getSelectedWays();
    694695        if (selectedWays!=null // if there is a selection
    695696            && selectedWays.size()==1 // and one way is selected
Note: See TracChangeset for help on using the changeset viewer.