Fix window focus issue when removing actors
This commit is contained in:
@@ -383,6 +383,7 @@ namespace FlaxEditor.Modules
|
||||
var objects = Selection.Where(x => x.CanDelete).ToList().BuildAllNodes().Where(x => x.CanDelete).ToList();
|
||||
if (objects.Count == 0)
|
||||
return;
|
||||
var isSceneTreeFocus = Editor.Windows.SceneWin.ContainsFocus;
|
||||
|
||||
SelectionDeleteBegin?.Invoke();
|
||||
|
||||
@@ -404,6 +405,9 @@ namespace FlaxEditor.Modules
|
||||
SelectionDeleteEnd?.Invoke();
|
||||
|
||||
OnDirty(objects);
|
||||
|
||||
if (isSceneTreeFocus)
|
||||
Editor.Windows.SceneWin.Focus();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace FlaxEditor.Windows
|
||||
: base(editor, true, ScrollBars.Vertical)
|
||||
{
|
||||
Title = "Properties";
|
||||
AutoFocus = true;
|
||||
|
||||
Presenter = new CustomEditorPresenter(editor.Undo);
|
||||
Presenter.Panel.Parent = this;
|
||||
|
||||
Reference in New Issue
Block a user