Ignore:
Timestamp:
2016-06-30T00:13:14+02:00 (9 years ago)
Author:
donvip
Message:

remove calls to deprecated methods

Location:
applications/editors/josm/plugins/buildings_tools/src/buildings_tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/buildings_tools/src/buildings_tools/Building.java

    r31361 r32455  
    207207
    208208    private Node findNode(EastNorth pos) {
    209         DataSet ds = Main.main.getCurrentDataSet();
     209        DataSet ds = Main.getLayerManager().getEditDataSet();
    210210        LatLon l = eastNorth2latlon(pos);
    211211        List<Node> nodes = ds.searchNodes(new BBox(l.lon() - 0.0000001, l.lat() - 0.0000001,
     
    234234        List<Node> nodes = new LinkedList<>();
    235235        nodesloop:
    236         for (Node n : Main.main.getCurrentDataSet().searchNodes(bbox)) {
     236        for (Node n : Main.getLayerManager().getEditDataSet().searchNodes(bbox)) {
    237237            if (!n.isUsable())
    238238                continue;
  • applications/editors/josm/plugins/buildings_tools/src/buildings_tools/DrawBuildingAction.java

    r31104 r32455  
    2020import java.util.Collection;
    2121import java.util.LinkedList;
    22 import java.util.Map;
    2322import java.util.Map.Entry;
    2423
     
    128127    public void enterMode() {
    129128        super.enterMode();
    130         if (getCurrentDataSet() == null) {
     129        if (getLayerManager().getEditDataSet() == null) {
    131130            Main.map.selectSelectTool(false);
    132131            return;
     
    140139        Main.map.keyDetector.addModifierListener(this);
    141140        DataSet.addSelectionListener(this);
    142         updateSnap(getCurrentDataSet().getSelected());
     141        updateSnap(getLayerManager().getEditDataSet().getSelected());
    143142    }
    144143
     
    307306                    showAddrDialog(w);
    308307                if (ToolSettings.isAutoSelect()
    309                         && (Main.main.getCurrentDataSet().getSelected().isEmpty() || shift)) {
    310                     Main.main.getCurrentDataSet().setSelected(w);
     308                        && (getLayerManager().getEditDataSet().getSelected().isEmpty() || shift)) {
     309                    getLayerManager().getEditDataSet().setSelected(w);
    311310                }
    312311            }
  • applications/editors/josm/plugins/buildings_tools/src/buildings_tools/MergeAddrPointsAction.java

    r31100 r32455  
    4949        if (!isEnabled())
    5050            return;
    51         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
     51        Collection<OsmPrimitive> selection = getLayerManager().getEditDataSet().getSelected();
    5252        if (selection.isEmpty()) {
    5353            new Notification(tr("Select both address nodes and building ways to merge"))
     
    146146    @Override
    147147    protected void updateEnabledState() {
    148         setEnabled(getCurrentDataSet() != null);
     148        setEnabled(getLayerManager().getEditDataSet() != null);
    149149    }
    150150}
Note: See TracChangeset for help on using the changeset viewer.