Don't create empty MissionGroups
Only create MissionGroups if there's at least one visible mission.
This commit is contained in:
@@ -118,10 +118,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
.OrderBy(x => x.Index)
|
.OrderBy(x => x.Index)
|
||||||
.Select(x => x.Preview);
|
.Select(x => x.Preview);
|
||||||
|
|
||||||
|
if (previews.Any())
|
||||||
|
{
|
||||||
CreateMissionGroup(kv.Key, previews);
|
CreateMissionGroup(kv.Key, previews);
|
||||||
allPreviews.AddRange(previews);
|
allPreviews.AddRange(previews);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Add an additional group for loose missions
|
// Add an additional group for loose missions
|
||||||
var loosePreviews = modData.MapCache
|
var loosePreviews = modData.MapCache
|
||||||
|
|||||||
Reference in New Issue
Block a user