Limit Edit to mcx only
- Issue MatterHackers/MCCentral#3583 'Edit' should be disabled for mesh (or do the code in the other bug for editing meshes)
This commit is contained in:
parent
34f2dcf81e
commit
5142141daf
1 changed files with 2 additions and 1 deletions
|
|
@ -598,11 +598,12 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
},
|
||||
IsEnabled = (selectedListItems, listView) =>
|
||||
{
|
||||
// Singleselect, WritableContainer - disallow containers and protected items
|
||||
// Singleselect, WritableContainer, mcx only - disallow containers and protected items
|
||||
return listView.SelectedItems.Count == 1
|
||||
&& selectedListItems.FirstOrDefault()?.Model is ILibraryItem firstItem
|
||||
&& !(firstItem is ILibraryContainer)
|
||||
&& !firstItem.IsProtected
|
||||
&& firstItem is ILibraryAsset asset && asset.ContentType == "mcx"
|
||||
&& ApplicationController.Instance.Library.ActiveContainer is ILibraryWritableContainer;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue