diff --git a/Assets/Cryville/Crtr/Browsing/UI/PathedResourceBrowser.cs b/Assets/Cryville/Crtr/Browsing/UI/PathedResourceBrowser.cs index 1fff293..8a6e26d 100644 --- a/Assets/Cryville/Crtr/Browsing/UI/PathedResourceBrowser.cs +++ b/Assets/Cryville/Crtr/Browsing/UI/PathedResourceBrowser.cs @@ -24,6 +24,7 @@ namespace Cryville.Crtr.Browsing.UI { IPathedResourceManager _manager; IResourceAction _importAction; + readonly IResourceAction[] _importActionArray = new IResourceAction[1]; readonly HashSet _selectedItems = new HashSet(); readonly Dictionary _items = new Dictionary(); @@ -56,6 +57,7 @@ namespace Cryville.Crtr.Browsing.UI { _manager.ItemChanged += OnItemChanged; _manager.DirectoryChanged += OnDirectoryChanged; Master.Actions.Register(_importAction = new ImportResourceAction(_manager)); + _importActionArray[0] = _importAction; foreach (var tool in m_writeTools) tool.interactable = !_manager.IsReadOnly; OnItemChanged(); @@ -101,7 +103,7 @@ namespace Cryville.Crtr.Browsing.UI { _selectedItems.Add(id); var res = _manager[id]; m_detailPanel.Load(res); - m_actionBar.Load(this, Master.Actions.GetActions(res.GetType())); + m_actionBar.Load(this, Master.Actions.GetActions(res.GetType()).Except(_importActionArray)); } public void OnPathClicked(int index) {