Expose long running task so that callers can block until completed

This commit is contained in:
John Lewin 2017-11-30 06:39:58 -08:00
parent 243d5d7ec2
commit d94525b3d9

View file

@ -49,6 +49,8 @@ namespace MatterHackers.MatterControl.PrintLibrary
private InteractiveScene scene;
private View3DWidget view3DWidget;
public Task LoadingItemsTask { get; }
static InsertionGroup()
{
// Create the placeholder mesh and position it at z0
@ -64,7 +66,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
this.scene = scene;
this.view3DWidget = view3DWidget;
Task.Run((Func<Task>)(async () =>
this.LoadingItemsTask = Task.Run((Func<Task>)(async () =>
{
var newItemOffset = Vector2.Zero;
if (!dragOperationActive())