From 1fc36e9e54de554212d20bbb623aa791c72e794e Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Thu, 22 Oct 2026 10:38:35 -0400 Subject: [PATCH] feat(desktop): open drawing sets from File without a nest Releasing a set creates new nests or merges into draft ones, so tying the set browser to the Drawing Library dialog (which needs an open nest) put it behind a document it never uses. File > Drawing Sets... (Database mode) now opens a standalone window with the set browser and Release, opening released nests in their own tabs. The library dialog loses its Sets tab but keeps Used in Sets and Add to Set on a drawing's menu. Co-Authored-By: Claude Opus 5.5 --- .../Forms/DrawingSetFormsTests.cs | 12 +-- OpenNest/Controls/DrawingSetBrowser.cs | 2 +- OpenNest/Forms/DrawingLibraryForm.Designer.cs | 52 +--------- OpenNest/Forms/DrawingLibraryForm.cs | 33 +------ OpenNest/Forms/DrawingSetsForm.Designer.cs | 99 +++++++++++++++++++ OpenNest/Forms/DrawingSetsForm.cs | 34 +++++++ OpenNest/Forms/EditNestForm.cs | 3 - OpenNest/Forms/MainForm.Designer.cs | 12 ++- OpenNest/Forms/MainForm.File.cs | 38 +++++++ docs/nest-storage.md | 15 +-- 10 files changed, 199 insertions(+), 101 deletions(-) create mode 100644 OpenNest/Forms/DrawingSetsForm.Designer.cs create mode 100644 OpenNest/Forms/DrawingSetsForm.cs diff --git a/OpenNest.WinForms.Tests/Forms/DrawingSetFormsTests.cs b/OpenNest.WinForms.Tests/Forms/DrawingSetFormsTests.cs index ccf36d1b..a96f3bee 100644 --- a/OpenNest.WinForms.Tests/Forms/DrawingSetFormsTests.cs +++ b/OpenNest.WinForms.Tests/Forms/DrawingSetFormsTests.cs @@ -14,7 +14,7 @@ public class DrawingSetFormsTests private static readonly TimeSpan TestTimeout = TimeSpan.FromSeconds(60); [Fact] - public void SetsTab_LoadsWhenShown_AndNewSetIsSavedThroughTheEditor() + public void DrawingSetsForm_LoadsWhenShown_AndNewSetIsSavedThroughTheEditor() { StaTestThread.Run( () => @@ -24,9 +24,8 @@ public class DrawingSetFormsTests var gusset = library.Add("SYN-GUSSET", "Synthetic Aluminum", 0.125); var sets = new InMemoryDrawingSets(); - using var form = new DrawingLibraryForm(library, Server, MatchingNest(), sets); - form.ShowMessage = (text, _, _) => throw new Xunit.Sdk.XunitException(text); - var browser = form.SetBrowser; + using var form = new DrawingSetsForm(sets, library, Server); + var browser = form.Browser; browser.ShowMessage = (text, _, _) => throw new Xunit.Sdk.XunitException(text); browser.EditSet = edit => { @@ -47,13 +46,10 @@ public class DrawingSetFormsTests Run(editor.SaveAsync()); return editor.Saved; }; + Assert.Empty(sets.Queries); form.Show(); - var tabs = Field(form, "tabControl"); var grid = Field(browser, "setGrid"); - Assert.Equal(new[] { "Drawings", "Sets" }, tabs.TabPages.Cast().Select(t => t.Text)); - Assert.Empty(sets.Queries); - tabs.SelectedIndex = 1; PumpUntil(() => sets.Queries.Count == 1 && !Field