Merge pull request #3415 from jlewin/design_tools
Truncate TreeView at ComponentObject3D
This commit is contained in:
commit
a7b3d3dda0
4 changed files with 10 additions and 18 deletions
|
|
@ -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<ImageObject3D>().FirstOrDefault()?.Image;
|
||||
|
||||
private IThresholdFunction ThresholdFunction
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue