Ignore:
Timestamp:
2010-02-06T23:41:55+01:00 (16 years ago)
Author:
pieren
Message:

from Clément Ménier, new option allowing an auto-selection of the first cadastre layer for grab

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePreferenceSetting.java

    r19288 r19894  
    99
    1010import org.openstreetmap.josm.Main;
    11 import org.openstreetmap.josm.gui.preferences.PreferenceDialog;
    1211import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
    1312import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
     
    5554    private JRadioButton crosspiece4 = new JRadioButton("100m");
    5655
     56    private JCheckBox autoFirstLayer = new JCheckBox(tr("Automaticly select first WMS layer when grabing if multiple layers exist."));
     57   
    5758    static final int DEFAULT_SQUARE_SIZE = 100;
    5859    private JTextField grabMultiplier4Size = new JTextField(5);
     
    224225        cadastrewms.add(jLabelCacheSize, GBC.std().insets(20, 0, 0, 0));
    225226        cadastrewms.add(cacheSize, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 5, 200, 5));
    226        
     227        // separator
     228        cadastrewms.add(new JSeparator(SwingConstants.HORIZONTAL), GBC.eol().fill(GBC.HORIZONTAL));
     229        autoFirstLayer.setSelected(Main.pref.getBoolean("cadastrewms.autoFirstLayer", false));
     230        autoFirstLayer.setToolTipText(tr("Automatically selects the first WMS layer if multiple layers exist when grabbing."));
     231        cadastrewms.add(autoFirstLayer, GBC.eop().insets(0, 0, 0, 0));
    227232        cadastrewms.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.VERTICAL));
    228233
     
    271276        } catch (NumberFormatException e) { // ignore the last input
    272277        }
     278        Main.pref.put("cadastrewms.autoFirstLayer", autoFirstLayer.isSelected());
    273279        CacheControl.cacheEnabled = enableCache.isSelected();
    274280        CadastrePlugin.refreshConfiguration();
Note: See TracChangeset for help on using the changeset viewer.