Changing to await able create methods
issue: MatterHackers/MCCentral#4966 async Rebuild calls must be awaited in Create methods
This commit is contained in:
parent
457e31ef10
commit
a055192700
18 changed files with 88 additions and 86 deletions
|
|
@ -148,7 +148,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
}
|
||||
}
|
||||
|
||||
public static FitToBoundsObject3D Create(IObject3D itemToFit)
|
||||
public static async Task<FitToBoundsObject3D> Create(IObject3D itemToFit)
|
||||
{
|
||||
FitToBoundsObject3D fitToBounds = new FitToBoundsObject3D();
|
||||
var aabb = itemToFit.GetAxisAlignedBoundingBox();
|
||||
|
|
@ -163,6 +163,8 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
fitToBounds.Children.Add(scaleItem);
|
||||
scaleItem.Children.Add(itemToFit);
|
||||
|
||||
await fitToBounds.Rebuild();
|
||||
|
||||
return fitToBounds;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue