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