Merge pull request #2665 from jlewin/design_tools

Scene actions should be bound to their context, not to ActivePrinter
This commit is contained in:
johnlewin 2017-11-15 21:04:58 -08:00 committed by GitHub
commit 694ffaa2f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -55,7 +55,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
this.BackgroundColor = theme.TabBodyBackground;
this.Padding = 0;
viewControls3D = new ViewControls3D(theme, sceneContext.Scene.UndoBuffer)
viewControls3D = new ViewControls3D(sceneContext, theme, sceneContext.Scene.UndoBuffer)
{
//BackgroundColor = new Color(0, 0, 0, theme.OverlayAlpha),
PartSelectVisible = false,

View file

@ -146,7 +146,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
}
}
public ViewControls3D(ThemeConfig theme, UndoBuffer undoBuffer)
public ViewControls3D(BedConfig sceneContext, ThemeConfig theme, UndoBuffer undoBuffer)
{
string iconPath;
@ -323,7 +323,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
};
button.Click += (s, e) =>
{
namedAction.Action.Invoke(ApplicationController.Instance.ActivePrinter.Bed.Scene);
namedAction.Action.Invoke(sceneContext.Scene);
};
this.AddChild(button);
}