From 07f77a4ba5b5faba54a38febf51a2ee6f1f10595 Mon Sep 17 00:00:00 2001 From: John Lewin Date: Sat, 17 Feb 2018 09:06:49 -0800 Subject: [PATCH] Eliminate redundant container --- PartPreviewWindow/View3D/View3DWidget.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/PartPreviewWindow/View3D/View3DWidget.cs b/PartPreviewWindow/View3D/View3DWidget.cs index 59dd78159..cf570c663 100644 --- a/PartPreviewWindow/View3D/View3DWidget.cs +++ b/PartPreviewWindow/View3D/View3DWidget.cs @@ -113,38 +113,32 @@ namespace MatterHackers.MatterControl.PartPreviewWindow this.BackgroundColor = theme.ActiveTabColor; this.Border = new BorderDouble(top: 1); this.BorderColor = theme.MinimalShade; + this.HAnchor = HAnchor.Stretch; // HAnchor.MaxFitOrStretch, + this.VAnchor = VAnchor.Stretch; // VAnchor.MaxFitOrStretch autoRotating = allowAutoRotate; allowAutoRotate = (autoRotate == AutoRotate.Enabled); viewControls3D.TransformStateChanged += ViewControls3D_TransformStateChanged; - var mainContainerTopToBottom = new FlowLayoutWidget(FlowDirection.TopToBottom) - { - HAnchor = HAnchor.MaxFitOrStretch, - VAnchor = VAnchor.MaxFitOrStretch - }; - // MeshViewer meshViewerWidget = new MeshViewerWidget(sceneContext, this.InteractionLayer, editorType: editorType); meshViewerWidget.RenderBed = sceneContext.RendererOptions.RenderBed; meshViewerWidget.AnchorAll(); - this.InteractionLayer.AddChild(meshViewerWidget); + this.AddChild(meshViewerWidget); // TumbleWidget this.InteractionLayer.AddChild(this.TrackballTumbleWidget); this.InteractionLayer.SetRenderTarget(this.meshViewerWidget); - mainContainerTopToBottom.AddChild(this.InteractionLayer); + this.AddChild(this.InteractionLayer); scene.SelectionChanged += Scene_SelectionChanged; // if the scene is invalidated invalidate the widget scene.Invalidated += (s, e) => Invalidate(); - this.AddChild(mainContainerTopToBottom); - this.AnchorAll(); this.TrackballTumbleWidget.TransformState = TrackBallController.MouseDownType.Rotation;