All the corner and edge controls are working

This commit is contained in:
Lars Brubaker 2021-04-16 17:03:39 -07:00
parent b13b3ed056
commit fa80380c26
12 changed files with 162 additions and 86 deletions

View file

@ -325,16 +325,18 @@ namespace MatterHackers.Plugins.EditorTools
public override void OnMouseUp(Mouse3DEventArgs mouseEvent3D)
{
if (hadClickOnControl
&& RootSelection is IObjectWithWidthAndDepth widthDepthItem
&& (widthDepthItem.Width != sizeOnMouseDown.X || widthDepthItem.Depth != sizeOnMouseDown.Y))
if (hadClickOnControl)
{
ScaleWidthDepthCornerControl.SetWidthDepthUndo(RootSelection,
Object3DControlContext.Scene.UndoBuffer,
new Vector2(widthDepthItem.Width, widthDepthItem.Depth),
RootSelection.Matrix,
sizeOnMouseDown,
matrixOnMouseDown);
if (RootSelection is IObjectWithWidthAndDepth widthDepthItem
&& (widthDepthItem.Width != sizeOnMouseDown.X || widthDepthItem.Depth != sizeOnMouseDown.Y))
{
ScaleWidthDepthCornerControl.SetWidthDepthUndo(RootSelection,
Object3DControlContext.Scene.UndoBuffer,
new Vector2(widthDepthItem.Width, widthDepthItem.Depth),
RootSelection.Matrix,
sizeOnMouseDown,
matrixOnMouseDown);
}
Object3DControlContext.Scene.ShowSelectionShadow = true;
}