Merge pull request #3418 from jlewin/design_tools

Limit Edit to mcx only
This commit is contained in:
johnlewin 2018-06-13 12:47:55 -07:00 committed by GitHub
commit 44d0969189
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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