Add support for conditional close to menus

- Use IIgnoredPopupChild marker interface
- Extract RotateControl to new file
- Use PopupActionPanel base for conditional close behavior
- Extract Grid options to new GridOptionsPanel.cs
- Fix null reference on translate/scale of gcodeViewWiget
This commit is contained in:
John Lewin 2017-05-27 17:48:32 -07:00
parent 21ce081d30
commit 02482f7121
13 changed files with 446 additions and 305 deletions

View file

@ -329,11 +329,17 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
switch (e.TransformMode)
{
case ViewControls3DButtons.Translate:
gcodeViewWidget.TransformState = ViewGcodeWidget.ETransformState.Move;
if (gcodeViewWidget != null)
{
gcodeViewWidget.TransformState = ViewGcodeWidget.ETransformState.Move;
}
meshViewerWidget.TrackballTumbleWidget.TransformState = TrackBallController.MouseDownType.Translation;
break;
case ViewControls3DButtons.Scale:
gcodeViewWidget.TransformState = ViewGcodeWidget.ETransformState.Scale;
if (gcodeViewWidget != null)
{
gcodeViewWidget.TransformState = ViewGcodeWidget.ETransformState.Scale;
}
meshViewerWidget.TrackballTumbleWidget.TransformState = TrackBallController.MouseDownType.Scale;
break;
case ViewControls3DButtons.Rotate: