fix(posts): name the post settings fields in head-raise and head-lock refusals

This commit is contained in:
aj committed 2026-11-04 23:01:58 -05:00
1 parent 014051c121
commit f31cd1c797
4 files changed
+11 -5

No files matched your search

+5 -3
View File
@@ -75,8 +75,10 @@ namespace OpenNest.CNC
/// </summary>
public static void EnsurePostable(Nest nest, bool hasCodes, string postName) =>
PostMarkers.EnsurePostable(nest, hasCodes, IsMarked, program => LockedMask(program.Codes),
name => $"{name} overcuts past the sheet edge with the head height locked, but the {postName} post "
+ "has no head-height lock and unlock codes. Enter them in the post's configuration, "
+ "or delete the cut-off and add it again with the head-height lock off.");
name => $"{name} overcuts past the sheet edge with the head height locked, but the "
+ $"{postName} post has no head-height lock and unlock codes. Enter them in "
+ $"\"Head height lock\" and \"Head height unlock\" in the {postName} Settings "
+ "dialog, which opens when you post, or delete the cut-off and add it again "
+ "with \"Lock head height and overcut the far edge\" unchecked.");
}
}
+3 -2
View File
@@ -80,7 +80,8 @@ namespace OpenNest.CNC
/// </summary>
public static void EnsurePostable(Nest nest, bool hasCode, string postName) =>
PostMarkers.EnsurePostable(nest, hasCode, IsMarked, program => RaisedMask(program.Codes),
name => $"{name} has rapids that must raise the head over parts already cut, but the {postName} "
+ "post has no head-raise code. Enter it in the post's configuration before posting.");
name => $"{name} has rapids that must raise the head over parts already cut, but "
+ $"the {postName} post has no head-raise code. Enter it in \"Head raise\" in "
+ $"the {postName} Settings dialog, which opens when you post.");
}
}
@@ -58,6 +58,7 @@ public class HeadRaisePostTests
var refusal = Assert.Throws<InvalidOperationException>(() => post.Post(Nest(markSecond: true), new MemoryStream()));
Assert.Contains("head-raise code", refusal.Message);
Assert.Contains("\"Head raise\" in the Cincinnati CI Fiber Settings dialog", refusal.Message);
post.Post(Nest(markSecond: false), new MemoryStream()); // Nothing marked: nothing to refuse.
}
@@ -201,6 +201,8 @@ public class HeadLockedCutOffTests
var refusal = Assert.Throws<InvalidOperationException>(() => HeadHeightLock.EnsurePostable(nest, false, "Test"));
Assert.Contains("head-height lock and unlock codes", refusal.Message);
Assert.Contains("\"Head height lock\" and \"Head height unlock\" in the Test Settings", refusal.Message);
Assert.Contains("\"Lock head height and overcut the far edge\" unchecked", refusal.Message);
HeadHeightLock.EnsurePostable(nest, true, "Test");
}