Ignore:
Timestamp:
2014-09-17T01:38:16+02:00 (10 years ago)
Author:
donvip
Message:

[josm_turnrestrictions] fix #josm8197 - add moped as supported exception

Location:
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ExceptValueModel.java

    r23510 r30651  
    2424        s.add("hgv");
    2525        s.add("bicycle");
     26        s.add("moped");
    2627        s.add("motorcar");
    2728        STANDARD_VEHICLE_EXCEPTION_VALUES = Collections.unmodifiableSet(s);
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/VehicleExceptionEditor.java

    r30365 r30651  
    4040    private JCheckBox cbPsv;
    4141    private JCheckBox cbBicyle;
     42    private JCheckBox cbMoped;
    4243    private JCheckBox cbHgv;
    4344    private JCheckBox cbMotorcar;
     
    124125        lbl.setIcon(ImageProvider.get("vehicle", "bicycle"));
    125126       
    126 
    127127        gc.weightx = 0.0;
    128128        gc.gridx++;
    129129        pnlStandard.add(cbBicyle, gc);
     130        gc.weightx = 1.0;
     131        gc.gridx++;
     132        pnlStandard.add(lbl, gc);
     133       
     134        cbMoped = new JCheckBox();
     135        cbMoped.addItemListener(svtChangeListener);
     136        lbl = new JLabel(tr("Mopeds"));
     137        lbl.setIcon(ImageProvider.get("vehicle", "moped"));
     138       
     139        gc.weightx = 0.0;
     140        gc.gridx = 0;
     141        gc.gridy = 2;
     142        pnlStandard.add(cbMoped, gc);
    130143        gc.weightx = 1.0;
    131144        gc.gridx++;
     
    238251            cbPsv.setSelected(exceptValue.isVehicleException("psv"));
    239252            cbBicyle.setSelected(exceptValue.isVehicleException("bicycle"));
     253            cbMoped.setSelected(exceptValue.isVehicleException("moped"));
    240254            cbMotorcar.setSelected(exceptValue.isVehicleException("motorcar"));
    241255            cbHgv.setSelected(exceptValue.isVehicleException("hgv"));
     
    318332            if (!enabled) return;
    319333            exceptValue.setVehicleException("bicycle", cbBicyle.isSelected());
     334            exceptValue.setVehicleException("moped", cbMoped.isSelected());
    320335            exceptValue.setVehicleException("hgv", cbHgv.isSelected());
    321336            exceptValue.setVehicleException("psv", cbPsv.isSelected());
Note: See TracChangeset for help on using the changeset viewer.