From 0f149f1143380300ac6893f5407cd907a975931e Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Tue, 13 Dec 2022 00:14:14 +0100 Subject: [PATCH] Fix the actor edit panel not always getting closed properly --- OpenRA.Mods.Common/Widgets/Logic/Editor/ActorEditLogic.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Editor/ActorEditLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Editor/ActorEditLogic.cs index a63c4f5c75..735f349154 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Editor/ActorEditLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Editor/ActorEditLogic.cs @@ -377,11 +377,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic actorEditPanel.Bounds.X = origin.X + editPanelPadding; actorEditPanel.Bounds.Y = origin.Y; } - else + else if (CurrentActor != null) { // Selected actor is null, hide the border and edit panel. - actorIDField.YieldKeyboardFocus(); - CurrentActor = null; + Close(); } }