Files
OpenNest/OpenNest.WinForms.Tests/IsolatedUserSettings.cs
T
ajandClaude Opus 5.5 667beb4334 fix(cutting): start planning from the user's settings
Edits in the Cutting Parameters dialog only reached user settings, while a
plate's stored parameters took priority, so a change was lost on any
planned plate unless Apply succeeded. User settings now win; a plate's own
are the fallback when none are saved or readable.

WinForms tests saved to the real user-settings.json, and with user settings
winning a test's lead-ins would feed real planning, so they now use a temp
file and skip the legacy settings carry-over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:06:11 -04:00

15 lines
500 B
C#

using System.Runtime.CompilerServices;
using OpenNest.Properties;
namespace OpenNest.WinForms.Tests;
internal static class IsolatedUserSettings
{
#pragma warning disable CA2255 // Must run before anything reads Settings.Default.
[ModuleInitializer]
internal static void Redirect() =>
AppDataSettingsProvider.PathOverride = Path.Combine(
Path.GetTempPath(), "OpenNest.WinForms.Tests", Guid.NewGuid().ToString("N"), "user-settings.json");
#pragma warning restore CA2255
}