From 75b98676e237340e37a55ae742cfa80b4a836ee3 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Thu, 7 Oct 2021 09:16:50 -0700 Subject: [PATCH 1/3] Don't refresh display on monotonic change --- MatterControl.Printing/Settings/SliceSettingsFields.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/MatterControl.Printing/Settings/SliceSettingsFields.cs b/MatterControl.Printing/Settings/SliceSettingsFields.cs index 39a9b2ab6..132822ec2 100644 --- a/MatterControl.Printing/Settings/SliceSettingsFields.cs +++ b/MatterControl.Printing/Settings/SliceSettingsFields.cs @@ -82,8 +82,6 @@ namespace MatterHackers.MatterControl.SlicerConfiguration HelpText = "When filling bottom and top solid layers always create them so that each new print segment side is touching a previous segment on the same side.".Localize(), DataEditType = DataEditTypes.CHECK_BOX, DefaultValue = "0", - RequiredDisplayDetail = DisplayDetailRequired.Advanced, - UiUpdate = UiUpdateRequired.SliceSettings, Converter = new MappedToBoolString(), }, new SliceSettingData() From beb526a41a0878cd7a57816ef6aed76e020e9b97 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Thu, 7 Oct 2021 18:39:27 -0700 Subject: [PATCH 2/3] Improving sheet parsing --- .../DesignTools/Operations/ArrayLinearObject3D.cs | 2 +- .../SlicerConfiguration/UIFields/Vector3Field.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MatterControlLib/DesignTools/Operations/ArrayLinearObject3D.cs b/MatterControlLib/DesignTools/Operations/ArrayLinearObject3D.cs index eb3865667..c57147547 100644 --- a/MatterControlLib/DesignTools/Operations/ArrayLinearObject3D.cs +++ b/MatterControlLib/DesignTools/Operations/ArrayLinearObject3D.cs @@ -96,7 +96,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations var updateItems = SheetObject3D.SortAndLockUpdateItems(this, (item) => { - if (!SheetObject3D.HasExpressionWithString(item, "[index]", false)) + if (!SheetObject3D.HasExpressionWithString(item, "=", true)) { return false; } diff --git a/MatterControlLib/SlicerConfiguration/UIFields/Vector3Field.cs b/MatterControlLib/SlicerConfiguration/UIFields/Vector3Field.cs index 91ebe4160..0697093ed 100644 --- a/MatterControlLib/SlicerConfiguration/UIFields/Vector3Field.cs +++ b/MatterControlLib/SlicerConfiguration/UIFields/Vector3Field.cs @@ -71,7 +71,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration double.TryParse(xyzStrings[0], out double currentXValue); - xEditWidget = new MHNumberEdit(currentXValue, theme, 'X', allowNegatives: true, allowDecimals: true, pixelWidth: VectorXYZEditWidth, tabIndex: tabIndex) + xEditWidget = new MHNumberEdit(currentXValue, theme, 'X', allowNegatives: true, allowDecimals: true, pixelWidth: VectorXYZEditWidth, tabIndex: tabIndex++) { ToolTipText = this.HelpText, TabIndex = tabIndex, @@ -93,7 +93,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration double.TryParse(xyzStrings[1], out double currentYValue); - yEditWidget = new MHNumberEdit(currentYValue, theme, 'Y', allowNegatives: true, allowDecimals: true, pixelWidth: VectorXYZEditWidth, tabIndex: tabIndex) + yEditWidget = new MHNumberEdit(currentYValue, theme, 'Y', allowNegatives: true, allowDecimals: true, pixelWidth: VectorXYZEditWidth, tabIndex: tabIndex++) { ToolTipText = this.HelpText, TabIndex = tabIndex + 1, @@ -115,7 +115,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration double.TryParse(xyzStrings[2], out double currentZValue); - zEditWidget = new MHNumberEdit(currentZValue, theme, 'Z', allowNegatives: true, allowDecimals: true, pixelWidth: VectorXYZEditWidth, tabIndex: tabIndex) + zEditWidget = new MHNumberEdit(currentZValue, theme, 'Z', allowNegatives: true, allowDecimals: true, pixelWidth: VectorXYZEditWidth, tabIndex: tabIndex++) { ToolTipText = this.HelpText, TabIndex = tabIndex + 1, From f3e4f52db087ef0fca25e5ac14a9c577a0025fc1 Mon Sep 17 00:00:00 2001 From: LarsBrubaker Date: Thu, 7 Oct 2021 20:57:27 -0700 Subject: [PATCH 3/3] More expressions working --- MatterControlLib/DesignTools/Sheets/SheetObject3D.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MatterControlLib/DesignTools/Sheets/SheetObject3D.cs b/MatterControlLib/DesignTools/Sheets/SheetObject3D.cs index dc79bf180..0a8c1d123 100644 --- a/MatterControlLib/DesignTools/Sheets/SheetObject3D.cs +++ b/MatterControlLib/DesignTools/Sheets/SheetObject3D.cs @@ -343,8 +343,7 @@ namespace MatterHackers.MatterControl.DesignTools int index = 0; foreach (var child in arrayObject.Children) { - if (!(child is OperationSourceContainerObject3D) - && !(child is OperationSourceObject3D)) + if (!(child is OperationSourceObject3D)) { if (child.DescendantsAndSelf().Where(i => i == owner).Any()) { @@ -385,8 +384,9 @@ namespace MatterHackers.MatterControl.DesignTools return stringWithConstants; } - public static T EvaluateExpression(IObject3D owner, string inputExpression) + public static T EvaluateExpression(IObject3D owner, string inExpression) { + var inputExpression = inExpression; var printer = owner.ContainingPrinter(); if (printer != null) {