diff --git a/ApplicationView/MainApplicationWidget.cs b/ApplicationView/MainApplicationWidget.cs index d1acbfdda..b3fb29365 100644 --- a/ApplicationView/MainApplicationWidget.cs +++ b/ApplicationView/MainApplicationWidget.cs @@ -98,11 +98,7 @@ namespace MatterHackers.MatterControl UiThread.RunOnIdle((state) => { // give the widget a chance to hear about the close before they are actually colsed. - bool cancelClose; - this.OnClosing(out cancelClose); - - this.CloseAndRemoveAllChildren(); - AddElements(); + widescreenPanel.RecreateAllPanels(); }); } diff --git a/ApplicationView/WidescreenPanel.cs b/ApplicationView/WidescreenPanel.cs index f8eb43d8a..ebe6266f4 100644 --- a/ApplicationView/WidescreenPanel.cs +++ b/ApplicationView/WidescreenPanel.cs @@ -229,7 +229,7 @@ namespace MatterHackers.MatterControl } } - void RecreateAllPanels(object state = null) + public void RecreateAllPanels(object state = null) { if (Width == 0) { diff --git a/PrintQueue/QueueDataView.cs b/PrintQueue/QueueDataView.cs index fb748ea50..489e27361 100644 --- a/PrintQueue/QueueDataView.cs +++ b/PrintQueue/QueueDataView.cs @@ -346,6 +346,7 @@ namespace MatterHackers.MatterControl.PrintQueue WidescreenPanel.PreChangePannels.RegisterEvent(SaveCurrentlySelctedItemIndex, ref unregisterEvents); + selectedQueueItemIndex = Math.Min(selectedQueueItemIndex, QueueData.Instance.Count-1); SelectedIndex = selectedQueueItemIndex; }