Ignore:
Timestamp:
2012-08-06T19:48:39+02:00 (12 years ago)
Author:
upliner
Message:

'BuildingTools: move "use address nodes" option to building size dialog and turn it off by default'

Location:
applications/editors/josm/plugins/buildings_tools/src/buildings_tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/buildings_tools/src/buildings_tools/AdvancedSettingsDialog.java

    r25893 r28529  
    1717    private final JCheckBox cBigMode = new JCheckBox(tr("Big buildings mode"));
    1818    private final JCheckBox cSoftCur = new JCheckBox(tr("Rotate crosshair"));
    19     private final JCheckBox cAddrNode = new JCheckBox(tr("Use address nodes under buildings"));
    2019
    2120    public AdvancedSettingsDialog() {
     
    3130        panel.add(cBigMode, GBC.eol().fill(GBC.HORIZONTAL));
    3231        panel.add(cSoftCur, GBC.eol().fill(GBC.HORIZONTAL));
    33         panel.add(cAddrNode, GBC.eol().fill(GBC.HORIZONTAL));
    3432
    3533        cBigMode.setSelected(ToolSettings.isBBMode());
    3634        cSoftCur.setSelected(ToolSettings.isSoftCursor());
    37         cAddrNode.setSelected(ToolSettings.PROP_USE_ADDR_NODE.get());
    3835
    3936        setupDialog();
     
    4643        ToolSettings.setBBMode(cBigMode.isSelected());
    4744        ToolSettings.setSoftCursor(cSoftCur.isSelected());
    48         ToolSettings.PROP_USE_ADDR_NODE.put(cAddrNode.isSelected());
    4945    }
    5046}
  • applications/editors/josm/plugins/buildings_tools/src/buildings_tools/BuildingSizeDialog.java

    r24243 r28529  
    1616@SuppressWarnings("serial")
    1717public class BuildingSizeDialog extends MyDialog {
    18     private JFormattedTextField twidth = new JFormattedTextField(NumberFormat.getInstance());
    19     private JFormattedTextField tlenstep = new JFormattedTextField(NumberFormat.getInstance());
    20     private JCheckBox caddr = new JCheckBox(tr("Use Address dialog"));
    21     private JCheckBox cAutoSelect = new JCheckBox(tr("Auto-select building"));
     18    private final JFormattedTextField twidth = new JFormattedTextField(NumberFormat.getInstance());
     19    private final JFormattedTextField tlenstep = new JFormattedTextField(NumberFormat.getInstance());
     20    private final JCheckBox caddr = new JCheckBox(tr("Use Address dialog"));
     21    private final JCheckBox cAutoSelect = new JCheckBox(tr("Auto-select building"));
     22    private final JCheckBox cAddrNode = new JCheckBox(tr("Use address nodes under buildings"));
    2223
    2324    public BuildingSizeDialog() {
     
    2829        panel.add(caddr, GBC.eol().fill(GBC.HORIZONTAL));
    2930        panel.add(cAutoSelect, GBC.eol().fill(GBC.HORIZONTAL));
     31        panel.add(cAddrNode, GBC.eol().fill(GBC.HORIZONTAL));
    3032
    3133        twidth.setValue(ToolSettings.getWidth());
     
    3335        caddr.setSelected(ToolSettings.isUsingAddr());
    3436        cAutoSelect.setSelected(ToolSettings.isAutoSelect());
     37        cAddrNode.setSelected(ToolSettings.PROP_USE_ADDR_NODE.get());
    3538
    3639        JButton bAdv = new JButton(tr("Advanced..."));
     
    7477        ToolSettings.setAddrDialog(useAddr());
    7578        ToolSettings.setAutoSelect(cAutoSelect.isSelected());
     79        ToolSettings.PROP_USE_ADDR_NODE.put(cAddrNode.isSelected());
    7680    }
    7781}
  • applications/editors/josm/plugins/buildings_tools/src/buildings_tools/ToolSettings.java

    r25893 r28529  
    1414
    1515public class ToolSettings {
    16     public static BooleanProperty PROP_USE_ADDR_NODE = new BooleanProperty("buildings_tools.addrNode", true);
     16    public static BooleanProperty PROP_USE_ADDR_NODE = new BooleanProperty("buildings_tools.addrNode", false);
    1717    private static double width = 0;
    1818    private static double lenstep = 0;
Note: See TracChangeset for help on using the changeset viewer.