Don't show internals of !persistable objects

This commit is contained in:
Lars Brubaker 2018-05-08 18:06:21 -07:00
parent 8057c5a3c6
commit 9678fe7561
2 changed files with 7 additions and 1 deletions

View file

@ -504,7 +504,7 @@ namespace MatterHackers.MatterControl.DesignTools
var row = CreateSettingsRow(context.item.Persistable ? "Registered".Localize() : "Demo Mode".Localize());
Button detailsLink = theme.ButtonFactory.Generate("Unlock".Localize(), AggContext.StaticData.LoadIcon("locked.png", 16, 16));
detailsLink.BackgroundColor = theme.Colors.PrimaryAccentColor.AdjustContrast(theme.Colors.PrimaryTextColor, 8).ToColor();
detailsLink.BackgroundColor = theme.Colors.PrimaryAccentColor.AdjustContrast(theme.Colors.PrimaryTextColor, 10).ToColor();
detailsLink.Margin = new BorderDouble(5);
detailsLink.Click += (s, e) =>
{

View file

@ -274,6 +274,12 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
{
activeEditors.Add((editor, child, child.Name));
}
// If the object is not persistable than don't show its details.
if(!child.Persistable)
{
break;
}
}
ShowObjectEditor(activeEditors, selectedItem);