Improving suspend and resume rebuild

This commit is contained in:
LarsBrubaker 2018-06-20 08:09:35 -07:00 committed by Lars Brubaker
parent b911206cb7
commit ec28305b56
42 changed files with 857 additions and 885 deletions

View file

@ -58,9 +58,9 @@ namespace MatterHackers.PolygonMesh.UnitTests
MatterControlUtilities.OverrideAppDataLocation(TestContext.CurrentContext.ResolveProjectPath(4));
var root = new Object3D();
IObject3D cube = new CubeObject3D();
var cube = new CubeObject3D();
root.Children.Add(cube);
cube.Rebuild(null);
cube.Invalidate(null);
Assert.AreEqual(1, root.Descendants().Count());
// now add a pinch
@ -80,7 +80,7 @@ namespace MatterHackers.PolygonMesh.UnitTests
MatterControlUtilities.OverrideAppDataLocation(TestContext.CurrentContext.ResolveProjectPath(4));
var root = new Object3D();
IObject3D text = new TextObject3D();
var text = new TextObject3D();
root.Children.Add(text);
text.Rebuild(null);
Assert.AreEqual(5, root.Descendants().Count());
@ -98,11 +98,11 @@ namespace MatterHackers.PolygonMesh.UnitTests
Assert.AreEqual(1, root.Children.Count());
// now add it again
text = root.Children.First(); // the wrap made a copy so set text to be the current text
Assert.IsTrue(text is TextObject3D);
var first = root.Children.First(); // the wrap made a copy so set text to be the current text
Assert.IsTrue(first is TextObject3D);
pinch1 = new PinchObject3D();
pinch1.WrapItems(new List<IObject3D>() { text });
root.Children.Remove(text);
pinch1.WrapItems(new List<IObject3D>() { first });
root.Children.Remove(first);
root.Children.Add(pinch1);
Assert.AreEqual(10, root.Descendants().Count());
}