Ignore:
Timestamp:
2012-02-01T19:39:19+01:00 (12 years ago)
Author:
simon04
Message:

fix #5920 - remotecontrol: add option for "new layer" to preference dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java

    r4834 r4883  
    2424    public static final String globalConfirmationKey = "remotecontrol.always-confirm";
    2525    public static final boolean globalConfirmationDefault = false;
     26    public static final String loadInNewLayerKey = "remotecontrol.new-layer";
     27    public static final boolean loadInNewLayerDefault = false;
    2628
    2729    /** The GET request arguments */
     
    210212    }
    211213
     214    protected boolean isLoadInNewLayer() {
     215        return args.get("new_layer") != null && !args.get("new_layer").isEmpty()
     216                ? Boolean.parseBoolean(args.get("new_layer"))
     217                : Main.pref.getBoolean(loadInNewLayerKey, loadInNewLayerDefault);
     218    }
     219
    212220    public static class RequestHandlerException extends Exception {
    213221
Note: See TracChangeset for help on using the changeset viewer.