From 35b0ff1423b0f0f68f10bed739484ffdbcbb609d Mon Sep 17 00:00:00 2001 From: John Lewin Date: Fri, 14 Dec 2018 12:57:10 -0800 Subject: [PATCH 1/2] Restore default "Calibration Parts" library container - Fix non-printer tests which use calibration parts --- .../MatterControl/LibraryCollectionContainer.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/MatterControlLib/Library/Providers/MatterControl/LibraryCollectionContainer.cs b/MatterControlLib/Library/Providers/MatterControl/LibraryCollectionContainer.cs index 530f54941..fee9f2b0f 100644 --- a/MatterControlLib/Library/Providers/MatterControl/LibraryCollectionContainer.cs +++ b/MatterControlLib/Library/Providers/MatterControl/LibraryCollectionContainer.cs @@ -54,6 +54,16 @@ namespace MatterHackers.MatterControl.Library () => new SqliteLibraryContainer(rootLibraryCollection.Id))); } + this.ChildContainers.Add( + new DynamicContainerLink( + () => "Calibration Parts".Localize(), + AggContext.StaticData.LoadIcon(Path.Combine("Library", "folder_20x20.png")), + AggContext.StaticData.LoadIcon(Path.Combine("Library", "folder.png")), + () => new CalibrationPartsContainer()) + { + IsReadOnly = true + }); + this.ChildContainers.Add( new DynamicContainerLink( () => "Primitives".Localize(), From 6286ca059cab4c9f784d51654a4f626a818d500c Mon Sep 17 00:00:00 2001 From: John Lewin Date: Fri, 14 Dec 2018 12:57:47 -0800 Subject: [PATCH 2/2] Add null reference guard for observed exception --- MatterControlLib/ActionBar/TemperatureWidgetBase.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MatterControlLib/ActionBar/TemperatureWidgetBase.cs b/MatterControlLib/ActionBar/TemperatureWidgetBase.cs index 70f631b6f..0d7a8e072 100644 --- a/MatterControlLib/ActionBar/TemperatureWidgetBase.cs +++ b/MatterControlLib/ActionBar/TemperatureWidgetBase.cs @@ -168,11 +168,12 @@ namespace MatterHackers.MatterControl.ActionBar private void EnableControls() { bool status = printer.Connection.IsConnected && !printer.Connection.PrinterIsPrinting; - if (isEnabled != status) + if (isEnabled != status + && this.PopupContent is GuiWidget popupContent) { isEnabled = status; - var flowLayout = this.PopupContent.Children.OfType().FirstOrDefault(); + var flowLayout = popupContent.Children.OfType().FirstOrDefault(); if (flowLayout != null) { foreach (var child in flowLayout.Children.Except(alwaysEnabled))