From 7743a34a8740d4548e078abdf1c012bbf6737e88 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Mon, 17 Dec 2018 16:12:11 -0800 Subject: [PATCH] Don't call ExandedChianged twice in TreeView Let MeshWrapper call GetAxisAl/ignedBoundingBox from base --- .../CustomWidgets/TreeView/TreeNode.cs | 1 - .../View3D/Actions/MeshWrapperObject3D.cs | 28 ------------------- Submodules/agg-sharp | 2 +- 3 files changed, 1 insertion(+), 30 deletions(-) diff --git a/MatterControlLib/CustomWidgets/TreeView/TreeNode.cs b/MatterControlLib/CustomWidgets/TreeView/TreeNode.cs index 94df4e4f4..9c08c7313 100644 --- a/MatterControlLib/CustomWidgets/TreeView/TreeNode.cs +++ b/MatterControlLib/CustomWidgets/TreeView/TreeNode.cs @@ -91,7 +91,6 @@ namespace MatterHackers.MatterControl.CustomWidgets expandWidget.Click += (s, e) => { this.Expanded = !this.Expanded; - this.ExpandedChanged?.Invoke(this, null); expandWidget.Expanded = this.Expanded; }; diff --git a/MatterControlLib/PartPreviewWindow/View3D/Actions/MeshWrapperObject3D.cs b/MatterControlLib/PartPreviewWindow/View3D/Actions/MeshWrapperObject3D.cs index 8aa45211b..609764a5a 100644 --- a/MatterControlLib/PartPreviewWindow/View3D/Actions/MeshWrapperObject3D.cs +++ b/MatterControlLib/PartPreviewWindow/View3D/Actions/MeshWrapperObject3D.cs @@ -73,34 +73,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D base.Flatten(undoBuffer); } - /// - /// MeshWrapperObject3D overrides GetAabb so that it can only check the geometry that it has created - /// - /// - /// - public override AxisAlignedBoundingBox GetAxisAlignedBoundingBox(Matrix4X4 matrix) - { - AxisAlignedBoundingBox totalBounds = AxisAlignedBoundingBox.Empty(); - - // This needs to be Descendants because we need to move past the first visible mesh to our owned objects - foreach (var child in this.Descendants().Where(i => i.OwnerID == this.ID && i.Visible)) - { - var childMesh = child.Mesh; - if (childMesh != null) - { - // Add the bounds of each child object - var childBounds = childMesh.GetAxisAlignedBoundingBox(child.WorldMatrix(this) * matrix); - // Check if the child actually has any bounds - if (childBounds.XSize > 0) - { - totalBounds += childBounds; - } - } - } - - return totalBounds; - } - public IEnumerable<(IObject3D original, IObject3D meshCopy)> WrappedObjects() { return this.Descendants() diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index c0dd75b18..7025350cc 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit c0dd75b189ef909264a736e7d9db9eca67a0c333 +Subproject commit 7025350cc177646c67ec926ee0ca7a7f914d63be