mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-02 13:41:37 -05:00
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>
15 lines
500 B
C#
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
|
|
}
|