Merge branch 'sel-prefab-clear-search' of https://github.com/Tryibion/FlaxEngine into Tryibion-sel-prefab-clear-search
This commit is contained in:
@@ -75,7 +75,11 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
|
||||
// Selecting actor prefab asset
|
||||
var selectPrefab = panel.Button("Select Prefab");
|
||||
selectPrefab.Button.Clicked += () => Editor.Instance.Windows.ContentWin.Select(prefab);
|
||||
selectPrefab.Button.Clicked += () =>
|
||||
{
|
||||
Editor.Instance.Windows.ContentWin.ClearItemsSearch();
|
||||
Editor.Instance.Windows.ContentWin.Select(prefab);
|
||||
};
|
||||
|
||||
// Viewing changes applied to this actor
|
||||
var viewChanges = panel.Button("View Changes");
|
||||
|
||||
@@ -202,6 +202,7 @@ namespace FlaxEditor.Modules
|
||||
|
||||
var prefabId = ((ActorNode)selection[0]).Actor.PrefabID;
|
||||
var prefab = FlaxEngine.Content.LoadAsync<Prefab>(prefabId);
|
||||
Editor.Windows.ContentWin.ClearItemsSearch();
|
||||
Editor.Windows.ContentWin.Select(prefab);
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace FlaxEditor.Windows
|
||||
public void ClearItemsSearch()
|
||||
{
|
||||
// Skip if already cleared
|
||||
if (_itemsSearchBox.TextLength == 0 && !_viewDropdown.HasSelection)
|
||||
if (_itemsSearchBox.TextLength == 0)
|
||||
return;
|
||||
|
||||
IsLayoutLocked = true;
|
||||
|
||||
Reference in New Issue
Block a user