Skip to content

Commit

Permalink
Fix #23149: Add line_arrangement to power supports presets (patch by …
Browse files Browse the repository at this point in the history
…gaben)

git-svn-id: https://josm.openstreetmap.de/svn/trunk@18834 0c6e7542-c601-0410-84e7-c038aed88b3b
  • Loading branch information
taylor.smock committed Sep 20, 2023
1 parent 2afecc2 commit 59ff06e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
23 changes: 13 additions & 10 deletions resources/data/defaultpresets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,11 @@
<reference ref="cables" />
<combo key="circuits" text="Amount of circuits" values="1,2,3,4" />
</chunk>
<chunk id="line_properties">
<combo key="line_attachment" text="Line attachment" values="suspension,anchor,pin,pulley" values_sort="false" values_context="power" />
<combo key="line_arrangement" text="Line arrangement" values="horizontal,semi_horizontal,vertical,semi_vertical,triangular,delta,square,unarranged" values_sort="false" values_context="power" />
<combo key="line_management" text="Line management" values="branch,cross,split,straight,termination,transition,transpose" values_context="Line management" />
</chunk>
<chunk id="power_loc">
<combo key="location" text="Location" values="outdoor,indoor,underground,platform,roof,surface" values_context="power" />
</chunk>
Expand Down Expand Up @@ -464,8 +469,7 @@
<reference ref="ref_operator" />
</chunk>
<chunk id="power_pole">
<combo key="line_attachment" text="Line attachment" values="anchor,pin,pulley,suspension" values_context="power" />
<combo key="line_management" text="Line management" values="branch,cross,split,straight,termination,transition,transpose" values_context="Line management" />
<reference ref="line_properties" />
<check key="location:transition" text="Location transition" disable_off="true" />
<reference ref="pole" />
</chunk>
Expand Down Expand Up @@ -6020,6 +6024,9 @@
<key key="man_made" value="utility_pole" />
<reference ref="pole" />
<reference ref="utilities" />
<optional>
<reference ref="line_properties"/>
</optional>
<preset_link preset_name="Pole" text="Similar preset:" />
</item> <!-- Utility Pole -->
<item name="Street Lamp" icon="presets/misc/streetlamp.svg" type="node" preset_name_label="true">
Expand Down Expand Up @@ -6870,8 +6877,7 @@
<space />
<key key="power" value="terminal" />
<optional>
<combo key="line_attachment" text="Line attachment" values="anchor,pin,pulley,suspension" values_context="power" />
<combo key="line_management" text="Line management" values="branch,cross,split,straight,termination,transition,transpose" values_context="Line management" />
<reference ref="line_properties" />
<reference ref="ref_operator" />
</optional>
</item> <!-- Terminal -->
Expand All @@ -6885,8 +6891,7 @@
<reference ref="color" />
<reference ref="ref_operator" />
<combo key="design" text="Portal design" values="portal,portal_two-level,portal_three-level" values_context="power" />
<combo key="line_attachment" text="Line attachment" values="anchor,pin,pulley,suspension" values_context="power" />
<combo key="line_management" text="Line management" values="branch,cross,split,straight,termination,transition,transpose" values_context="Line management" />
<reference ref="line_properties" />
</item> <!-- Power Portal -->
<item name="Power Tower" icon="presets/power/tower.svg" type="node" preset_name_label="true">
<link wiki="Tag:power=tower" />
Expand All @@ -6899,8 +6904,7 @@
<reference ref="ref_operator" />
<optional>
<combo key="design" text="Tower design" values="one-level,two-level,donau,three-level,barrel,asymmetric,triangle,flag,donau;one-level,four-level,six-level,nine-level,delta,delta_two-level,y-frame,x-frame,h-frame,guyed_h-frame,portal,portal_two-level,portal_three-level,guyed_v-frame,bipole,monopolar" values_context="power" />
<combo key="line_attachment" text="Line attachment" values="anchor,pin,pulley,suspension" values_context="power" />
<combo key="line_management" text="Line management" values="branch,cross,split,straight,termination,transition,transpose" values_context="Line management" />
<reference ref="line_properties" />
<check key="triple_tower" text="Triple tower" />
<check key="design:incomplete" text="Incomplete tower" />
<check key="location:transition" text="Location transition" disable_off="true" />
Expand Down Expand Up @@ -6960,8 +6964,7 @@
<link wiki="Tag:power=insulator" />
<space />
<key key="power" value="insulator" />
<combo key="line_attachment" text="Line attachment" values="anchor,pin,pulley,suspension" values_context="power" />
<combo key="line_management" text="Line management" values="branch,cross,split,straight,termination,transition,transpose" values_context="Line management" />
<reference ref="line_properties" />
<reference ref="ref_operator" />
</item> <!-- Insulator -->
<separator/>
Expand Down
6 changes: 4 additions & 2 deletions resources/data/validator/deprecated.mapcss
Original file line number Diff line number Diff line change
Expand Up @@ -1897,8 +1897,9 @@ way[/^is_in:/] {
throwWarning: tr("{0} is deprecated for {1}", "{0.key}", "{1.tag}");
suggestAlternative: "design";
suggestAlternative: "structure";
suggestAlternative: "line_management";
suggestAlternative: "line_arrangement";
suggestAlternative: "line_attachment";
suggestAlternative: "line_management";
set generic_power_tower_type_warning;
group: tr("deprecated tagging");
}
Expand Down Expand Up @@ -1957,8 +1958,9 @@ node[pole:type=transition] {
}
*[pole:type][power][power=~/^(tower|pole|insulator|portal|terminal)$/]!.power_pole_type_warning!.generic_power_tower_type_warning {
throwWarning: tr("{0} is deprecated for {1}", "{0.key}", "{1.tag}");
suggestAlternative: "line_management";
suggestAlternative: "line_arrangement";
suggestAlternative: "line_attachment";
suggestAlternative: "line_management";
group: tr("deprecated tagging");
}

Expand Down
1 change: 1 addition & 0 deletions resources/data/validator/geometry.mapcss
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ way[voltage:primary],
way[voltage:secondary],
way[voltage:tertiary],
way[transformer],
way[line_arrangement],
way[line_attachment],
way[line_management],
way[entrance],
Expand Down

0 comments on commit 59ff06e

Please sign in to comment.