Changeset 6460 in josm for trunk


Ignore:
Timestamp:
2013-12-09T22:43:39+01:00 (11 years ago)
Author:
simon04
Message:

see #7563 - put WMS auto zoom default setting to preference dialog

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java

    r6333 r6460  
    111111    public static final IntegerProperty PROP_OVERLAP_NORTH = new IntegerProperty("imagery.wms.overlapNorth", 4);
    112112    public static final IntegerProperty PROP_IMAGE_SIZE = new IntegerProperty("imagery.wms.imageSize", 500);
     113    public static final BooleanProperty PROP_DEFAULT_AUTOZOOM = new BooleanProperty("imagery.wms.default_autozoom", true);
    113114
    114115    public int messageNum = 5; //limit for messages per layer
     
    124125    protected static final int serializeFormatVersion = 5;
    125126    protected boolean autoDownloadEnabled = true;
    126     protected boolean autoResolutionEnabled = true;
     127    protected boolean autoResolutionEnabled = PROP_DEFAULT_AUTOZOOM.get();
    127128    protected boolean settingsChanged;
    128129    public WmsCache cache;
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/WMSSettingsPanel.java

    r5465 r6460  
    2626
    2727    // WMS Settings
     28    private final JCheckBox autozoomActive;
    2829    private final JosmComboBox browser;
    2930    private final JCheckBox overlapCheckBox;
     
    3738    public WMSSettingsPanel() {
    3839        super(new GridBagLayout());
    39        
     40
     41        // Auto zoom
     42        autozoomActive = new JCheckBox();
     43        add(new JLabel(tr("Auto zoom by default: ")), GBC.std());
     44        add(GBC.glue(5, 0), GBC.std());
     45        add(autozoomActive, GBC.eol().fill(GBC.HORIZONTAL));
     46
    4047        // Downloader
    4148        browser = new JosmComboBox(new String[] {
     
    8087     */
    8188    public void loadSettings() {
     89        this.autozoomActive.setSelected(WMSLayer.PROP_DEFAULT_AUTOZOOM.get());
    8290        this.browser.setSelectedItem(HTMLGrabber.PROP_BROWSER.get());
    8391        this.overlapCheckBox.setSelected(WMSLayer.PROP_OVERLAP.get());
     
    92100     */
    93101    public boolean saveSettings() {
     102        WMSLayer.PROP_DEFAULT_AUTOZOOM.put(this.autozoomActive.isSelected());
    94103        WMSLayer.PROP_OVERLAP.put(overlapCheckBox.getModel().isSelected());
    95104        WMSLayer.PROP_OVERLAP_EAST.put((Integer) spinEast.getModel().getValue());
Note: See TracChangeset for help on using the changeset viewer.