From 1ae80da888c0607d25d284b520cc2f5ca66ffaa8 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sat, 23 Jul 2022 16:14:02 +0200 Subject: [PATCH] Fix missing Properties window focus after adding script to the actor --- Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs index e7446f8bb..47147381e 100644 --- a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs +++ b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs @@ -241,7 +241,12 @@ namespace FlaxEditor.CustomEditors.Dedicated var multiAction = new MultiUndoAction(actions); multiAction.Do(); - ScriptsEditor.Presenter?.Undo.AddAction(multiAction); + var presenter = ScriptsEditor.Presenter; + if (presenter != null) + { + presenter.Undo.AddAction(multiAction); + presenter.Control.Focus(); + } } }