Changeset 17556 in josm for trunk


Ignore:
Timestamp:
2021-03-08T20:45:04+01:00 (4 years ago)
Author:
Don-vip
Message:

fix #20310 - Update deprecated methods used elsewhere in JOSM core (patch by taylor.smock, modified)

Location:
trunk/src/org/openstreetmap/josm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java

    r17534 r17556  
    201201         * @param options The options to set
    202202         * @see Options
    203          * @since 17534
    204          */
    205         public void setOptions(Options[] options) {
     203         * @since 17556
     204         */
     205        public void setOptions(Options... options) {
    206206            this.options.clear();
    207207            if (options != null) {
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r17545 r17556  
    106106import org.openstreetmap.josm.gui.io.CustomConfigurator.XMLCommandProcessor;
    107107import org.openstreetmap.josm.gui.io.SaveLayersDialog;
     108import org.openstreetmap.josm.gui.io.importexport.Options;
    108109import org.openstreetmap.josm.gui.layer.AutosaveTask;
    109110import org.openstreetmap.josm.gui.layer.Layer;
     
    12761277        }
    12771278        if (!fileList.isEmpty()) {
    1278             tasks.add(OpenFileAction.openFiles(fileList, true));
     1279            tasks.add(OpenFileAction.openFiles(fileList, Options.RECORD_HISTORY));
    12791280        }
    12801281        for (String s : args.get(Option.DOWNLOADGPS)) {
  • trunk/src/org/openstreetmap/josm/gui/datatransfer/importers/FilePaster.java

    r12634 r17556  
    1313import org.openstreetmap.josm.data.coor.EastNorth;
    1414import org.openstreetmap.josm.gui.MainApplication;
     15import org.openstreetmap.josm.gui.io.importexport.Options;
    1516import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    1617
     
    3435        List<File> files = (List<File>) support.getTransferable().getTransferData(df);
    3536        OpenFileAction.OpenFileTask task = new OpenFileAction.OpenFileTask(files, null);
    36         task.setRecordHistory(true);
     37        task.setOptions(Options.RECORD_HISTORY);
    3738        MainApplication.worker.submit(task);
    3839        return true;
  • trunk/src/org/openstreetmap/josm/gui/io/RecentlyOpenedFilesMenu.java

    r13647 r17556  
    1919import org.openstreetmap.josm.actions.OpenFileAction.OpenFileTask;
    2020import org.openstreetmap.josm.gui.MainApplication;
     21import org.openstreetmap.josm.gui.io.importexport.Options;
    2122import org.openstreetmap.josm.spi.preferences.Config;
    2223import org.openstreetmap.josm.tools.ImageProvider;
     
    8586        public void actionPerformed(ActionEvent e) {
    8687            OpenFileTask task = new OpenFileTask(Collections.singletonList(new File(file)), null);
    87             task.setRecordHistory(true);
     88            task.setOptions(Options.RECORD_HISTORY);
    8889            MainApplication.worker.submit(task);
    8990        }
Note: See TracChangeset for help on using the changeset viewer.