diff --git a/DesignTools/Operations/Image/ImageToPath.cs b/DesignTools/Operations/Image/ImageToPath.cs index b87815644..330557b79 100644 --- a/DesignTools/Operations/Image/ImageToPath.cs +++ b/DesignTools/Operations/Image/ImageToPath.cs @@ -72,19 +72,7 @@ namespace MatterHackers.MatterControl.DesignTools public IVertexSource VertexSource { get; set; } = new VertexStorage(); [JsonIgnore] - private ImageBuffer Image - { - get - { - var item = this.Descendants().Where((d) => d is ImageObject3D).FirstOrDefault(); - if (item is ImageObject3D imageItem) - { - return imageItem.Image; - } - - return null; - } - } + private ImageBuffer Image => this.Descendants().FirstOrDefault()?.Image; private IThresholdFunction ThresholdFunction { diff --git a/DesignTools/Primitives/ComponentObject3D.cs b/DesignTools/Primitives/ComponentObject3D.cs index 6d0f83b07..12c5be56c 100644 --- a/DesignTools/Primitives/ComponentObject3D.cs +++ b/DesignTools/Primitives/ComponentObject3D.cs @@ -29,10 +29,11 @@ either expressed or implied, of the FreeBSD Project. using System.Collections.Generic; using MatterHackers.DataConverters3D; +using MatterHackers.MatterControl.CustomWidgets; namespace MatterHackers.MatterControl.DesignTools { - public class ComponentObject3D : Object3D + public class ComponentObject3D : Object3D, IVisualLeafNode { public ComponentObject3D() { diff --git a/Library/ContentProviders/MeshContentProvider.cs b/Library/ContentProviders/MeshContentProvider.cs index 82172e0b7..a3e5428fd 100644 --- a/Library/ContentProviders/MeshContentProvider.cs +++ b/Library/ContentProviders/MeshContentProvider.cs @@ -108,7 +108,7 @@ namespace MatterHackers.MatterControl long fileSize = 0; if (item is ILibraryAssetStream contentModel - // Only load the stream if it's available - prevents download of internet content simply for thumbnails + // Only load the stream if it's available - prevents download of Internet content simply for thumbnails && contentModel.LocalContentExists && contentModel.FileSize < MaxFileSizeForThumbnail) { diff --git a/PartPreviewWindow/StartPage/ExplorerBar.cs b/PartPreviewWindow/StartPage/ExplorerBar.cs index e64af9ca3..1f9d82f0f 100644 --- a/PartPreviewWindow/StartPage/ExplorerBar.cs +++ b/PartPreviewWindow/StartPage/ExplorerBar.cs @@ -226,13 +226,16 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.PlusTab var printer = await ProfileManager.Instance.LoadPrinter(); printer.ViewState.ViewMode = PartViewMode.Model; - // Load empty plate - await printer.Bed.LoadContent( + // Load empty plate + await printer.Bed.LoadContent( new EditContext() { ContentStore = ApplicationController.Instance.Library.PlatingHistory, SourceItem = BedConfig.NewPlatingItem(ApplicationController.Instance.Library.PlatingHistory) }); + + // Always switch to printer tab after changing plate + partPreviewContent.TabControl.SelectedTabIndex = 1; }); } }; @@ -262,7 +265,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.PlusTab var printer = ApplicationController.Instance.ActivePrinter; printer.ViewState.ViewMode = PartViewMode.Model; - // Always switch to printer tab after loading plate + // Always switch to printer tab after changing plate partPreviewContent.TabControl.SelectedTabIndex = 1; }); }