diff --git a/MatterControl.MeshOperations/DecimateObject3D.cs b/MatterControlLib/DesignTools/Operations/DecimateObject3D.cs similarity index 98% rename from MatterControl.MeshOperations/DecimateObject3D.cs rename to MatterControlLib/DesignTools/Operations/DecimateObject3D.cs index 4025042f8..e990f4173 100644 --- a/MatterControl.MeshOperations/DecimateObject3D.cs +++ b/MatterControlLib/DesignTools/Operations/DecimateObject3D.cs @@ -53,6 +53,8 @@ namespace MatterHackers.MatterControl.DesignTools Polygon_Percent } + public override bool Persistable => ApplicationController.Instance.UserHasPermission(this); + public ReductionMode Mode { get; set; } = ReductionMode.Polygon_Percent; [ReadOnly(true)] diff --git a/MatterControl.MeshOperations/RepairObject3D.cs b/MatterControlLib/DesignTools/Operations/RepairObject3D.cs similarity index 99% rename from MatterControl.MeshOperations/RepairObject3D.cs rename to MatterControlLib/DesignTools/Operations/RepairObject3D.cs index 37385c666..d373c24e9 100644 --- a/MatterControl.MeshOperations/RepairObject3D.cs +++ b/MatterControlLib/DesignTools/Operations/RepairObject3D.cs @@ -26,6 +26,8 @@ namespace MatterHackers.MatterControl.DesignTools Name = "Repair".Localize(); } + public override bool Persistable => ApplicationController.Instance.UserHasPermission(this); + [Description("Make all the faces have a consistent orientation.")] public bool FaceOrientation { get; set; } = true; diff --git a/MatterControlLib/Library/Widgets/StorePage/UpgradeToProTabPage.cs b/MatterControlLib/Library/Widgets/StorePage/UpgradeToProTabPage.cs index 867c98d1f..dab576d13 100644 --- a/MatterControlLib/Library/Widgets/StorePage/UpgradeToProTabPage.cs +++ b/MatterControlLib/Library/Widgets/StorePage/UpgradeToProTabPage.cs @@ -74,7 +74,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.PlusTab { markdownWidget.Markdown = markDown; }); - }); + }, + true); } } } diff --git a/MatterControlLib/Utilities/WebUtilities/WebCache.cs b/MatterControlLib/Utilities/WebUtilities/WebCache.cs index 410e353ac..31c54dac0 100644 --- a/MatterControlLib/Utilities/WebUtilities/WebCache.cs +++ b/MatterControlLib/Utilities/WebUtilities/WebCache.cs @@ -200,12 +200,18 @@ namespace MatterHackers.MatterControl } } - public static void RetrieveText(string uriToLoad, Action updateResult) + public static void RetrieveText(string uriToLoad, Action updateResult, bool checkStaticData = false) { var longHash = uriToLoad.GetLongHashCode(); var textFileName = ApplicationController.CacheablePath("Text", longHash.ToString() + ".txt"); + // change to a path that makes it easy to collect up all the text we want to ship with MC + if (checkStaticData) + { + textFileName = ApplicationController.CacheablePath("Text_OverRide", longHash.ToString() + ".txt"); + } + string fileText = null; if (File.Exists(textFileName)) { @@ -218,9 +224,20 @@ namespace MatterHackers.MatterControl { } } - else // check if it is in the shipping data for the application + else // We could not find it in the cache. Check if it is in static data. { - + if (File.Exists(textFileName)) + { + try + { + textFileName = AggContext.StaticData.ReadAllText(Path.Combine("Text_OverRide", longHash.ToString() + ".txt")); + fileText = File.ReadAllText(textFileName); + updateResult?.Invoke(fileText); + } + catch + { + } + } } Task.Run(async () =>