Fix IDE0074

This commit is contained in:
RoosterDragon
2023-04-05 19:20:51 +01:00
committed by Pavel Penev
parent cbd0583289
commit bd2b3d9793
30 changed files with 42 additions and 81 deletions

View File

@@ -194,8 +194,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
if (added.Add(hd))
{
if (selectedHotkeyDefinition == null)
selectedHotkeyDefinition = hd;
selectedHotkeyDefinition ??= hd;
BindHotkeyPref(hd, template);
}

View File

@@ -155,8 +155,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
var panel = panelContainer.Get(panelID);
if (activePanel == null)
activePanel = panelID;
activePanel ??= panelID;
panel.IsVisible = () => activePanel == panelID;