diff --git a/Library/CreateFolderWindow.cs b/Library/CreateFolderWindow.cs index d4fe74b78..12e5334a0 100644 --- a/Library/CreateFolderWindow.cs +++ b/Library/CreateFolderWindow.cs @@ -102,7 +102,17 @@ namespace MatterHackers.MatterControl topToBottom.AddChild(buttonRow); ShowAsSystemWindow(); - UiThread.RunOnIdle(folderNameWidget.Focus); + } + + bool firstDraw = true; + public override void OnDraw(Graphics2D graphics2D) + { + if (firstDraw) + { + UiThread.RunOnIdle(folderNameWidget.Focus); + firstDraw = false; + } + base.OnDraw(graphics2D); } private void ActualTextEditWidget_EnterPressed(object sender, KeyEventArgs keyEvent) diff --git a/PartPreviewWindow/SaveAsWindow.cs b/PartPreviewWindow/SaveAsWindow.cs index c2f43fb11..7fb0fab16 100644 --- a/PartPreviewWindow/SaveAsWindow.cs +++ b/PartPreviewWindow/SaveAsWindow.cs @@ -137,8 +137,17 @@ namespace MatterHackers.MatterControl topToBottom.AddChild(buttonRow); ShowAsSystemWindow(); + } - UiThread.RunOnIdle(textToAddWidget.Focus); + bool firstDraw = true; + public override void OnDraw(Graphics2D graphics2D) + { + if (firstDraw) + { + UiThread.RunOnIdle(textToAddWidget.Focus); + firstDraw = false; + } + base.OnDraw(graphics2D); } private void ActualTextEditWidget_EnterPressed(object sender, KeyEventArgs keyEvent) diff --git a/PrinterControls/TerminalWindow/TerminalWidget.cs b/PrinterControls/TerminalWindow/TerminalWidget.cs index 7aed8c852..e54e6bba4 100644 --- a/PrinterControls/TerminalWindow/TerminalWidget.cs +++ b/PrinterControls/TerminalWindow/TerminalWidget.cs @@ -53,6 +53,7 @@ namespace MatterHackers.MatterControl public TerminalWidget(bool showInWindow) { + this.Name = "TerminalWidget"; this.BackgroundColor = backgroundColor; this.Padding = new BorderDouble(5, 0); FlowLayoutWidget topLeftToRightLayout = new FlowLayoutWidget(); @@ -141,8 +142,6 @@ namespace MatterHackers.MatterControl manualCommandTextEdit.ActualTextEditWidget.EnterPressed += new KeyEventHandler(manualCommandTextEdit_EnterPressed); manualCommandTextEdit.ActualTextEditWidget.KeyDown += new KeyEventHandler(manualCommandTextEdit_KeyDown); manualEntryLayout.AddChild(manualCommandTextEdit); - - UiThread.RunOnIdle(manualCommandTextEdit.Focus); } manualEntryTopToBottomLayout.AddChild(manualEntryLayout); @@ -212,6 +211,7 @@ namespace MatterHackers.MatterControl { filterOutput.Checked = UserSettings.Instance.Fields.GetBool(TerminalFilterOutputKey, false); firstDraw = false; + UiThread.RunOnIdle(manualCommandTextEdit.Focus); } base.OnDraw(graphics2D); } diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 31f7c3892..f52d6ed36 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 31f7c3892342e1d28f1ca357ceb65e8fb0cdc49d +Subproject commit f52d6ed36c2ef23daa62451bbf9e2b54fb76316e