Added passing UndoBuffer to rebuildable

This commit is contained in:
Lars Brubaker 2018-03-08 17:23:03 -08:00
parent 4e41fa6694
commit 9cc6d5f469
43 changed files with 208 additions and 99 deletions

View file

@ -36,6 +36,7 @@ using MatterHackers.Agg.UI;
using MatterHackers.Localizations;
using MatterHackers.MatterControl.CustomWidgets;
using MatterHackers.MatterControl.SlicerConfiguration;
using MatterHackers.VectorMath;
namespace MatterHackers.MatterControl.PartPreviewWindow
{
@ -81,7 +82,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
HAnchor = HAnchor.Fit | HAnchor.Left,
VAnchor = VAnchor.Fit,
Padding = 5,
MinimumSize = new VectorMath.Vector2(400, 65),
MinimumSize = new Vector2(400, 65),
Margin = new BorderDouble(top: 10),
};
column.AddChild(optionsPanel);

View file

@ -1036,8 +1036,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
{
DragSelectionEndPosition = mouseEvent.Position - OffsetToMeshViewerWidget();
DragSelectionEndPosition = new Vector2(
Math.Max(Math.Min(DragSelectionEndPosition.X, meshViewerWidget.LocalBounds.Right), meshViewerWidget.LocalBounds.Left),
Math.Max(Math.Min(DragSelectionEndPosition.Y, meshViewerWidget.LocalBounds.Top), meshViewerWidget.LocalBounds.Bottom));
Math.Max(Math.Min((double)DragSelectionEndPosition.X, meshViewerWidget.LocalBounds.Right), meshViewerWidget.LocalBounds.Left),
Math.Max(Math.Min((double)DragSelectionEndPosition.Y, meshViewerWidget.LocalBounds.Top), meshViewerWidget.LocalBounds.Bottom));
Invalidate();
}