From 5e2606f679f2d5d9ede329e236fd737a94da1b14 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Sun, 1 Nov 2026 14:07:33 -0500 Subject: [PATCH] Add a Zoom To Area button to the plate header The header gets a fourth zoom button that starts the existing Zoom Window action, with a matching dashed-window icon also shown on View > Zoom To > Area. It stays out of the inspection's live zoom controls: inspection owns Escape, so a zoom window could not be cancelled there. --- .../Forms/CuttingValidationPanelTests.cs | 27 ++++++++++++++++++ OpenNest/Forms/EditNestForm.cs | 11 +++++-- OpenNest/Forms/MainForm.Designer.cs | 1 + OpenNest/Properties/Resources.Designer.cs | 7 +++++ OpenNest/Properties/Resources.resx | 3 ++ OpenNest/Resources/zoom_area.png | Bin 0 -> 781 bytes 6 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 OpenNest/Resources/zoom_area.png diff --git a/OpenNest.WinForms.Tests/Forms/CuttingValidationPanelTests.cs b/OpenNest.WinForms.Tests/Forms/CuttingValidationPanelTests.cs index 9bfdbab1..837c2594 100644 --- a/OpenNest.WinForms.Tests/Forms/CuttingValidationPanelTests.cs +++ b/OpenNest.WinForms.Tests/Forms/CuttingValidationPanelTests.cs @@ -1,6 +1,7 @@ using System.Drawing; using System.Reflection; using System.Windows.Forms; +using OpenNest.Actions; using OpenNest.CNC; using OpenNest.Diagnostics; using OpenNest.Forms; @@ -321,6 +322,32 @@ public class CuttingValidationPanelTests Assert.Equal(1, editor.PlateManager.CurrentIndex); }); + [Fact] + public void HeaderZoomToAreaStartsZoomWindowButIsLockedDuringInspection() => RunSta(() => + { + using var editor = RapidEditor(); + editor.Show(); + editor.PlateManager.LoadAt(0); + var view = editor.PlateView; + var area = Assert.IsType