Add CanInvoke
method to IResourceAction
.
This commit is contained in:
@@ -122,7 +122,7 @@ namespace Cryville.Crtr.Browsing.UI {
|
||||
var res = _manager[id];
|
||||
m_detailPanel.Load(res);
|
||||
if (_selectedItems.Count == 1) {
|
||||
LoadActions(res);
|
||||
LoadActions(_manager.GetItemUri(id), res);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
@@ -133,11 +133,12 @@ namespace Cryville.Crtr.Browsing.UI {
|
||||
internal override void OnActionsChanged() {
|
||||
if (_destroyed) return;
|
||||
if (_selectedItems.Count == 1) {
|
||||
LoadActions(_manager[_selectedItems.Single()]);
|
||||
int id = _selectedItems.Single();
|
||||
LoadActions(_manager.GetItemUri(id), _manager[id]);
|
||||
}
|
||||
}
|
||||
void LoadActions(IResourceMeta res) {
|
||||
m_actionBar.Load(this, Master.Actions.GetActions(res.GetType()).Except(_importActionArray));
|
||||
void LoadActions(Uri uri, IResourceMeta res) {
|
||||
m_actionBar.Load(this, Master.Actions.GetActions(uri, res).Except(_importActionArray));
|
||||
}
|
||||
|
||||
public void OnPathClicked(int index) {
|
||||
|
Reference in New Issue
Block a user