Merge pull request #2666 from jlewin/design_tools

Create unique context for default "New Part" tab page
This commit is contained in:
johnlewin 2017-11-16 07:37:35 -08:00 committed by GitHub
commit bb72f53600
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -96,7 +96,15 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
}
else
{
this.CreatePartTab("New Part", printer.Bed, theme);
this.CreatePartTab(
"New Part",
new BedConfig(
new EditContext()
{
ContentStore = ApplicationController.Instance.Library.PlatingHistory,
SourceItem = BedConfig.NewPlatingItem()
}),
theme);
}
// add in the update available button

View file

@ -175,6 +175,11 @@ namespace MatterControl.Tests.MatterControl
if (Activator.CreateInstance(containerType, args.ToArray()) is ILibraryWritableContainer libraryContainer)
{
if (!libraryContainer.AllowAction(ContainerActions.AddItems))
{
continue;
}
if (libraryContainer is ZipMemoryContainer zipContainer)
{
zipContainer.Path = TestContext.CurrentContext.ResolveProjectPath(4, "Tests", "TestData", "TestParts", "Batman.zip");