Excludes import action in self browser.
This commit is contained in:
@@ -24,6 +24,7 @@ namespace Cryville.Crtr.Browsing.UI {
|
||||
|
||||
IPathedResourceManager<IResourceMeta> _manager;
|
||||
IResourceAction _importAction;
|
||||
readonly IResourceAction[] _importActionArray = new IResourceAction[1];
|
||||
|
||||
readonly HashSet<int> _selectedItems = new HashSet<int>();
|
||||
readonly Dictionary<int, BrowserItem> _items = new Dictionary<int, BrowserItem>();
|
||||
@@ -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) {
|
||||
|
Reference in New Issue
Block a user