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:
John Lewin 2018-06-13 12:28:05 -07:00
parent 34f2dcf81e
commit 5142141daf

View file

@ -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;
}
});