Ignore:
Timestamp:
2016-07-02T00:18:48+02:00 (9 years ago)
Author:
donvip
Message:

remove calls to deprecated methods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/simplifyarea/src/sk/zdila/josm/plugin/simplify/SimplifyAreaAction.java

    r30791 r32517  
    4848
    4949    private List<Bounds> getCurrentEditBounds() {
    50         return Main.main.getEditLayer().data.getDataSourceBounds();
     50        return Main.getLayerManager().getEditLayer().data.getDataSourceBounds();
    5151    }
    5252
     
    6565        return 0 == HelpAwareOptionPane.showOptionDialog(
    6666                Main.parent,
    67                 "<html>" + trn("The selected way has nodes outside of the downloaded data region.", "The selected ways have nodes outside of the downloaded data region.", getCurrentDataSet().getSelectedWays().size())
     67                "<html>" + trn("The selected way has nodes outside of the downloaded data region.", "The selected ways have nodes outside of the downloaded data region.",
     68                        Main.getLayerManager().getEditDataSet().getSelectedWays().size())
    6869                + "<br>" + tr("This can lead to nodes being deleted accidentally.") + "<br>" + tr("Do you want to delete them anyway?") + "</html>",
    6970                tr("Delete nodes outside of data regions?"), JOptionPane.WARNING_MESSAGE, null, // no special icon
     
    7879        final ButtonSpec[] options = new ButtonSpec[] { new ButtonSpec(tr("Yes"), ImageProvider.get("ok"), tr("Simplify all selected ways"), null),
    7980                new ButtonSpec(tr("Cancel"), ImageProvider.get("cancel"), tr("Cancel operation"), null) };
    80         return 0 == HelpAwareOptionPane.showOptionDialog(Main.parent, tr("The selection contains {0} ways. Are you sure you want to simplify them all?", numWays), tr("Simplify ways?"),
     81        return 0 == HelpAwareOptionPane.showOptionDialog(Main.parent, tr("The selection contains {0} ways. Are you sure you want to simplify them all?", numWays),
     82                tr("Simplify ways?"),
    8183                JOptionPane.WARNING_MESSAGE, null, // no special icon
    8284                options, options[0], null);
     
    8587    @Override
    8688    public void actionPerformed(final ActionEvent e) {
    87         final Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
     89        final Collection<OsmPrimitive> selection = getLayerManager().getEditDataSet().getSelected();
    8890
    8991        final List<Bounds> bounds = getCurrentEditBounds();
     
    449451    @Override
    450452    protected void updateEnabledState() {
    451         if (getCurrentDataSet() == null) {
     453        if (getLayerManager().getEditDataSet() == null) {
    452454            setEnabled(false);
    453455        } else {
    454             updateEnabledState(getCurrentDataSet().getSelected());
     456            updateEnabledState(getLayerManager().getEditDataSet().getSelected());
    455457        }
    456458    }
Note: See TracChangeset for help on using the changeset viewer.