Switch to gcode in the embedded view if loaded.
This commit is contained in:
parent
8ea4b9bb52
commit
1085d0e66b
2 changed files with 9 additions and 8 deletions
|
|
@ -62,7 +62,15 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
this.AnchorAll();
|
||||
this.Load(printItem);
|
||||
}
|
||||
|
||||
// We do this after showing the system window so that when we try and take focus of the parent window (the system window)
|
||||
// it exists and can give the focus to its child the gcode window.
|
||||
if (printItem != null
|
||||
&& Path.GetExtension(printItem.FileLocation).ToUpper() == ".GCODE")
|
||||
{
|
||||
SwitchToGcodeView();
|
||||
}
|
||||
}
|
||||
|
||||
public void Reload(PrintItemWrapper printItem)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
MinimumSize = new Vector2(400, 300);
|
||||
ShowAsSystemWindow();
|
||||
|
||||
// We do this after showing the system window so that when we try and take focus of the parent window (the system window)
|
||||
// it exists and can give the focus to its child the gcode window.
|
||||
if (Path.GetExtension(printItem.FileLocation).ToUpper() == ".GCODE")
|
||||
{
|
||||
partPreviewWidget.SwitchToGcodeView();
|
||||
}
|
||||
}
|
||||
|
||||
private void AddHandlers()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue