Changeset 5155 in josm for trunk/data


Ignore:
Timestamp:
2012-04-01T19:48:01+02:00 (7 years ago)
Author:
simon04
Message:

fix #5933 - tagging presets: allow to change the matching process (match=none|key|key!|keyvalue), remove delete_if_empty, default defaults to "", adapted comments in defaultpresets.xml, refactoring of the matching process (removes some duplicate code and some magical arithmetic)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/defaultpresets.xml

    r5150 r5155  
    2525  key: key to set
    2626  value: value to set
     27  match: none/key/key!/keyvalue (default is "ketvalue", see below for more information)
    2728
    2829text: text box
    2930  key: key to set
    3031  text: fixed label to display
    31   default: default string to display
    32   delete_if_empty: true/false
    33   use_last_as_default: true/false/force
     32  default: default string to display (defaults to "")
     33  use_last_as_default: true/false/force (default is "false")
     34  match: none/key/key!/keyvalue (default is "none", see below for more information)
    3435
    3536combo: combo box, with multiple choices and possible to enter free form text
     
    4647                                ...
    4748                        <short_description>last description</short_description>
    48   default: default string to display
    49   delete_if_empty: true/false
    50   use_last_as_default: true/false/force
     49  default: default string to display (defaults to "")
     50  use_last_as_default: true/false/force (default is "false")
     51  match: none/key/key!/keyvalue (default is none, see below for more information)
    5152
    5253multiselect: list of values from which zero or more can be selected
     
    6667                                ...
    6768                        <short_description>last description</short_description>
    68   default: default string to display
    69   delete_if_empty: true/false
    70   use_last_as_default: true/false/force
     69  default: default string to display (defaults to "")
     70  use_last_as_default: true/false/force (default is "false")
     71  match: none/key/key!/keyvalue (default is "none", see below for more information)
    7172
    7273check: checkbox
     
    7475  text: fixed label to display
    7576  default: ticked on/off
    76   delete_if_empty: true/false
    7777  value_on: the value to set when checked (default is "yes")
    78   value_off: the value to set when unchecked (default is 'no')
     78  value_off: the value to set when unchecked (default is "no")
     79  match: none/key/key!/keyvalue (default is "none", see below for more information)
    7980
    8081role: type to specify possible roles in relations
     
    103104no specific translation has been given in XML file. When no "display_values"
    104105are supplied, then "values" will be treated as "display_values" and translated instead.
     106
     107The match attribute allows to change the matching process, i.e., determining whether
     108the tags of an OSM object fit into this preset.
     109 - none: neutral, i.e., do not consider this item for matching
     110 - key: positive if key matches, neutral otherwise
     111 - key!: positive if key matches, negative otherwise
     112 - keyvalue: positive if key and value matches, negative otherwise
     113Note that for a match, at least one positive and no negative is required.
    105114-->
    106115  <group name="Highways" icon="presets/way_secondary.png">
Note: See TracChangeset for help on using the changeset viewer.