Skip to content

Commit 9417e1b

Browse files
Solve merge problem with PR 751
1 parent 91d69f8 commit 9417e1b

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

Source/ORTS.Common/Input/UserCommand.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,6 @@ public enum UserCommand
1414
[GetString("Game Pause")] GamePause,
1515
[GetString("Game Screenshot")] GameScreenshot,
1616
[GetString("Game Fullscreen")] GameFullscreen,
17-
/*
18-
* comment to be removed
19-
*
20-
*/
21-
//
22-
[GetString("Game External Controller (RailDriver)")] GameExternalCabController,
23-
//
24-
/*
25-
* comment to be removed
26-
*
27-
*/
2817
[GetString("Game Switch Ahead")] GameSwitchAhead,
2918
[GetString("Game Switch Behind")] [GetParticularString("SwitchPanel", "Switch Behind")] GameSwitchBehind,
3019
[GetString("Game Switch Picked")] [GetParticularString("SwitchPanel", "")] GameSwitchPicked,

Source/RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchOnPanelDefinition.cs

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,26 @@ private void init2(UserCommand userCommandTop, UserCommand userCommandBottom)
175175

176176
private string determineDescription(UserCommand userCommand)
177177
{
178-
// get the user command enum description for SwitchPanel
179-
string description = GetParticularStringAttribute.GetParticularPrettyName("SwitchPanel", userCommand);
180178

181-
// translate the description
182-
description = capitalize(Viewer.Catalog.GetParticularString("SwitchPanel", description));
179+
string description = "";
180+
181+
if (userCommand != ORTS.Common.Input.UserCommand.GameSwitchAhead)
182+
{
183+
// get the user command enum description for SwitchPanel
184+
description = GetParticularStringAttribute.GetParticularPrettyName("SwitchPanel", userCommand);
185+
186+
// translate the description
187+
description = capitalize(Viewer.Catalog.GetParticularString("SwitchPanel", description));
188+
}
189+
else
190+
{
191+
// this is a workaround to solve a merge conflict with PR 757 "Unify RailDriver code implementations"
192+
// once both PR 757 and this one PR 831 are merged into master file this else can be removed
193+
// and the file Source\ORTS.Common\Input\UserCommand.cs to be changed
194+
description = capitalize(Viewer.Catalog.GetParticularString("SwitchPanel", "Switch Ahead"));
195+
}
196+
197+
183198

184199
return description;
185200
}

0 commit comments

Comments
 (0)