Remove DragDropData.Printer

This commit is contained in:
John Lewin 2018-11-12 07:43:28 -08:00
parent ab79d84a04
commit 731a4e2506
2 changed files with 3 additions and 4 deletions

View file

@ -2549,7 +2549,6 @@ If you experience adhesion problems, please re-run leveling."
public class DragDropData
{
public View3DWidget View3DWidget { get; set; }
public PrinterConfig Printer { get; internal set; }
public BedConfig SceneContext { get; set; }
}

View file

@ -648,7 +648,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
{
// TODO: Sort out the right way to have an ActivePrinter context that looks and behaves correctly
var activeContext = ApplicationController.Instance.DragDropData;
var printer = activeContext.Printer;
var printer = activeContext.View3DWidget.Printer;
switch (selectedLibraryItems.FirstOrDefault())
{
@ -682,7 +682,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
},
IsEnabled = (selectedListItems, listView) =>
{
var communicationState = ApplicationController.Instance.DragDropData?.Printer?.Connection.CommunicationState;
var communicationState = ApplicationController.Instance.DragDropData?.View3DWidget?.Printer?.Connection.CommunicationState;
// Singleselect - disallow containers
return listView.SelectedItems.Count == 1
@ -719,7 +719,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
Action = (selectedLibraryItems, listView) =>
{
var activeContext = ApplicationController.Instance.DragDropData;
var printer = activeContext.Printer;
var printer = activeContext.View3DWidget.Printer;
if (listView.SelectedItems.Count == 1 &&
selectedLibraryItems.FirstOrDefault() is ILibraryAssetStream assetStream