Fix closure issue with mission objectives. Fixes #6680.
This commit is contained in:
@@ -53,8 +53,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
{
|
{
|
||||||
parent.RemoveChildren();
|
parent.RemoveChildren();
|
||||||
|
|
||||||
foreach (var objective in mo.Objectives.OrderBy(o => o.Type))
|
foreach (var o in mo.Objectives.OrderBy(o => o.Type))
|
||||||
{
|
{
|
||||||
|
var objective = o; // Work around the loop closure issue in older versions of C#
|
||||||
var widget = template.Clone();
|
var widget = template.Clone();
|
||||||
|
|
||||||
var label = widget.Get<LabelWidget>("OBJECTIVE_TYPE");
|
var label = widget.Get<LabelWidget>("OBJECTIVE_TYPE");
|
||||||
|
|||||||
Reference in New Issue
Block a user