From df6bcbfb0ff733e22c3551ae0c248938efd5bf88 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Wed, 3 Feb 2021 14:42:52 -0800 Subject: [PATCH 1/2] Make sure we show clear_bed_gcode settings --- MatterControl.Printing/Settings/PrinterSettings.cs | 1 + MatterControl.Printing/Settings/SliceSettingsFields.cs | 5 +++-- MatterControlLib/SetupWizard/HelpTreePanel.cs | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MatterControl.Printing/Settings/PrinterSettings.cs b/MatterControl.Printing/Settings/PrinterSettings.cs index 0b1d5ec2b..a4fdc0e0e 100644 --- a/MatterControl.Printing/Settings/PrinterSettings.cs +++ b/MatterControl.Printing/Settings/PrinterSettings.cs @@ -104,6 +104,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration SettingsKey.before_toolchange_gcode_3, SettingsKey.build_height, SettingsKey.cancel_gcode, + SettingsKey.clear_bed_gcode, SettingsKey.com_port, SettingsKey.connect_gcode, SettingsKey.create_brim, diff --git a/MatterControl.Printing/Settings/SliceSettingsFields.cs b/MatterControl.Printing/Settings/SliceSettingsFields.cs index 54a18aeae..ddb4d5ede 100644 --- a/MatterControl.Printing/Settings/SliceSettingsFields.cs +++ b/MatterControl.Printing/Settings/SliceSettingsFields.cs @@ -406,10 +406,11 @@ namespace MatterHackers.MatterControl.SlicerConfiguration { SlicerConfigName = SettingsKey.clear_bed_gcode, PresentationName = "Clear Bed G-Code".Localize(), - HelpText = "G-Code the Auto Pilot Pro Tool will run to clear the bed after a print completes. This is only useful on a printer designed to clear the bed.".Localize(), - RequiredDisplayDetail = DisplayDetailRequired.Simple, + HelpText = "G-Code used by Auto Pilot to clear the bed after a print completes. This is only useful on a printer designed to clear the bed.".Localize(), + RequiredDisplayDetail = DisplayDetailRequired.Advanced, DataEditType = DataEditTypes.MULTI_LINE_TEXT, DefaultValue = "", + RebuildGCodeOnChange = false, Converter = new GCodeMapping(), }, new SliceSettingData() diff --git a/MatterControlLib/SetupWizard/HelpTreePanel.cs b/MatterControlLib/SetupWizard/HelpTreePanel.cs index d3acaa884..49117a985 100644 --- a/MatterControlLib/SetupWizard/HelpTreePanel.cs +++ b/MatterControlLib/SetupWizard/HelpTreePanel.cs @@ -38,9 +38,7 @@ using MatterHackers.Agg.Image; using MatterHackers.Agg.UI; using MatterHackers.Localizations; using MatterHackers.MatterControl.CustomWidgets; -using MatterHackers.MatterControl.PartPreviewWindow; using MatterHackers.MatterControl.PrintLibrary; -using MatterHackers.VectorMath; namespace MatterHackers.MatterControl { From 5fc583deb2def722d47f05374ae621329a212232 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Thu, 4 Feb 2021 13:15:04 -0800 Subject: [PATCH 2/2] Cleaning up api --- MatterControlLib/ApplicationView/ApplicationController.cs | 4 ++-- MatterControlLib/MatterControlApplication.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MatterControlLib/ApplicationView/ApplicationController.cs b/MatterControlLib/ApplicationView/ApplicationController.cs index 92d451ce3..893a5d102 100644 --- a/MatterControlLib/ApplicationView/ApplicationController.cs +++ b/MatterControlLib/ApplicationView/ApplicationController.cs @@ -128,7 +128,7 @@ namespace MatterHackers.MatterControl public bool IsMatterControlPro() { - var result = ApplicationController.Instance.UserHasPermissionToId?.Invoke("ag1zfm1oLWRmcy1wcm9kchgLEgtEaWdpdGFsSXRlbRiAgIDzyMGxCgw"); + var result = ApplicationController.Instance.UserHasPro?.Invoke(); if (result != null) { return result.Value; @@ -373,7 +373,7 @@ namespace MatterHackers.MatterControl public Func UserHasPermission { get; set; } = (item) => false; // check permission to a purchase - public Func UserHasPermissionToId { get; set; } + public Func UserHasPro { get; set; } public Func GetUnlockData { get; set; } diff --git a/MatterControlLib/MatterControlApplication.cs b/MatterControlLib/MatterControlApplication.cs index cbb99f590..caa0a7749 100644 --- a/MatterControlLib/MatterControlApplication.cs +++ b/MatterControlLib/MatterControlApplication.cs @@ -38,7 +38,7 @@ namespace MatterHackers.MatterControl static MatterControlApplication() { - if (MatterHackers.MatterControl.AppContext.Options.McwsTestEnvironment) + if (AppContext.Options.McwsTestEnvironment) { MCWSBaseUri = "https://mattercontrol-test.appspot.com"; // http://192.168.2.129:9206 }