Improving 3D control rendering

Width Depth control able to alter part
This commit is contained in:
Lars Brubaker 2021-04-12 18:00:59 -07:00
parent 9a00aa4e87
commit d5ca11dcd4
8 changed files with 18 additions and 19 deletions

View file

@ -177,8 +177,7 @@ namespace MatterHackers.Plugins.EditorTools
var selectedItem = RootSelection;
if (selectedItem != null
&& Object3DControlContext.Scene.ShowSelectionShadow)
if (selectedItem != null)
{
// Ensures that functions in this scope run against the original instance reference rather than the
// current value, thus avoiding null reference errors that would occur otherwise
@ -186,7 +185,7 @@ namespace MatterHackers.Plugins.EditorTools
if (shouldDrawScaleControls)
{
// don't draw if any other control is dragging
if (MouseIsOver)
if (MouseIsOver || MouseDownOnControl)
{
GLHelper.Render(minXminYMesh, theme.PrimaryAccentColor.WithAlpha(e.Alpha0to255), TotalTransform, RenderTypes.Shaded);
}
@ -459,7 +458,6 @@ namespace MatterHackers.Plugins.EditorTools
lines.Add(Object3DControlContext.World.GetScreenPosition(xOtherSide - new Vector3(0, ySign * DistToStart * distBetweenPixelsWorldSpace, 0)));
lines.Add(Object3DControlContext.World.GetScreenPosition(xOtherSide - new Vector3(0, ySign * (DistToStart + LineLength) * distBetweenPixelsWorldSpace, 0)));
}
}
}