Skip to content

Commit 30f92ab

Browse files
committed
Automatic merge of T1.5.1-913-g91804456c and 16 pull requests
- Pull request #570 at 3539862: Experimental glTF 2.0 support with PBR lighting - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder - Pull request #882 at 1a5693d: Blueprint/train car operations UI window - Pull request #886 at 6c0785b: Scene viewer extension to TrackViewer - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #896 at 5866028: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains - Pull request #903 at 29f3d1a: Downloading route content (Github, zip) - Pull request #910 at 97d4569: Allow building code using .NET 6 (Windows) - Pull request #911 at 6834af0: docs: Add refactoring as a special type of PR - Pull request #912 at f7b85e4: New Triple Valve Features Vol. 2 - Pull request #919 at 1a376fa: Added mouse wheel support for controls which can be moved by pressing t… - Pull request #920 at a94e403: Update RailDriver in Manual - Pull request #923 at e0f3c55: Add curve squeal to route - Pull request #924 at 6c2c3cd: Default Asset Improvements - Pull request #925 at e3b1688: Fix brakeshoe force bug
18 parents ac24330 + 9180445 + 3539862 + d00beb9 + f92de76 + 1a5693d + 6c0785b + 1f5ba4c + 5866028 + 29f3d1a + 97d4569 + 6834af0 + f7b85e4 + 1a376fa + a94e403 + e0f3c55 + 6c2c3cd + e3b1688 commit 30f92ab

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

Source/Menu/DownloadContentForm.cs

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ void StartButton_Click(object sender, EventArgs e)
775775
mainForm.comboBoxStartAt.SelectedIndex = determineSelectedIndex(mainForm.comboBoxStartAt, route.Start.StartingAt);
776776
mainForm.comboBoxHeadTo.SelectedIndex = determineSelectedIndex(mainForm.comboBoxHeadTo, route.Start.HeadingTo);
777777

778-
mainForm.comboBoxStartTime.SelectedIndex = determineSelectedIndex(mainForm.comboBoxStartTime, route.Start.Time);
778+
mainForm.comboBoxStartTime.Text = route.Start.Time;
779779
mainForm.comboBoxStartSeason.SelectedIndex = determineSelectedIndex(mainForm.comboBoxStartSeason, route.Start.Season);
780780
mainForm.comboBoxStartWeather.SelectedIndex = determineSelectedIndex(mainForm.comboBoxStartWeather, route.Start.Weather);
781781
}
@@ -791,6 +791,9 @@ void StartButton_Click(object sender, EventArgs e)
791791
// close this dialog
792792
DialogResult = DialogResult.OK;
793793

794+
setCursorToDefaultCursor();
795+
ClosingBlocked = false;
796+
794797
return;
795798
}
796799

@@ -880,7 +883,23 @@ private int determineSelectedIndex(ComboBox comboBox, string compareWith)
880883
}
881884
else
882885
{
883-
throw new StartNotFound(Catalog.GetStringFmt(compareWith));
886+
if (classOfItem == "Route")
887+
{
888+
// if a route is not found and amount of routes is 1
889+
// then default to this one and only route
890+
if (comboBox.Items.Count == 1)
891+
{
892+
index = 0;
893+
}
894+
else
895+
{
896+
throw new StartNotFound(Catalog.GetStringFmt(compareWith));
897+
}
898+
}
899+
else
900+
{
901+
throw new StartNotFound(Catalog.GetStringFmt(compareWith));
902+
}
884903
}
885904

886905
return index;

0 commit comments

Comments
 (0)