Skip to content

Interactive 2D wave optics simulator. Turn any image into a refractive scene, add sources, watch waves refract, diffract and interfere. Probes, intensity maps, video export.

C#

Del on a handle or a graph box in the preview removes its object

Alexander Graefb0d504a19423
diff --git a/CLAUDE.md b/CLAUDE.md
index 6377af2..516aa3b 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -179,8 +179,8 @@ FrameStore: native memory up to the budget, the rest in a temp file (%LOCALAPPDA
the rest and lost on a blue scheme and to colour-blind eyes; the keyboard focus keeps the accent); a probe's handles and line appear only on the picture of
the layer it measures (2026-10-18), sources on both; graph boxes lie over every handle and dot, the selected
item is drawn last among its kind, except the handles themselves (Panel.ZIndex breaks the Tab cycle, 2026-10-18);
- arrows nudge, selection syncs with the tree, a click on
- empty space deselects. **Group selection** (2026-10-19): one shared `SelectedItems` list on the window beside the
+ arrows nudge, Del on a handle or a graph box removes its item or the selection it belongs to as the tree's Del does
+ (2026-10-26), selection syncs with the tree, a click on empty space deselects. **Group selection** (2026-10-19): one shared `SelectedItems` list on the window beside the
current `SelectedItem` (the properties pane shows the current one); in the tree Ctrl+click, Insert or Ctrl+Space
toggles a row, Shift+click or Shift+arrows selects the range from the anchor, Ctrl+A everything, the row's context
menu has both; on the pictures a drag on empty space is a marquee (Shift adds, Ctrl toggles), Ctrl+click on a handle
diff --git a/WaveDudeNext.WPF/Controls/ProbeGraphOverlay.cs b/WaveDudeNext.WPF/Controls/ProbeGraphOverlay.cs
index 54ea218..365ac93 100644
--- a/WaveDudeNext.WPF/Controls/ProbeGraphOverlay.cs
+++ b/WaveDudeNext.WPF/Controls/ProbeGraphOverlay.cs
@@ -530,6 +530,13 @@ public sealed class ProbeGraphOverlay : Panel
{
return;
}
+ if (e.Key == Key.Delete)
+ {
+ // Del on a handle removes its item, or the selection it belongs to, as Del on a tree row does (2026-10-26, the user's request)
+ Commands.ProjectCommands.Remove.Execute(thumb.Item, thumb);
+ e.Handled = true;
+ return;
+ }
int step = (Keyboard.Modifiers & ModifierKeys.Shift) != 0 ? KeyStepFast : KeyStep;
(int dx, int dy) = e.Key switch
{
diff --git a/WaveDudeNext.WPF/Controls/SceneOverlay.cs b/WaveDudeNext.WPF/Controls/SceneOverlay.cs
index 2d3ab4c..3592862 100644
--- a/WaveDudeNext.WPF/Controls/SceneOverlay.cs
+++ b/WaveDudeNext.WPF/Controls/SceneOverlay.cs
@@ -1322,6 +1322,13 @@ public sealed class SceneOverlay : Panel
e.Handled = true;
return;
}
+ if (e.Key == Key.Delete)
+ {
+ // Del on a handle removes its item, or the selection it belongs to, as Del on a tree row does (2026-10-26, the user's request)
+ Commands.ProjectCommands.Remove.Execute(thumb.Item, thumb);
+ e.Handled = true;
+ return;
+ }
int step = (Keyboard.Modifiers & ModifierKeys.Shift) != 0 ? KeyStepFast : KeyStep;
if (thumb.Role is MarkerRole.SourceAngle or MarkerRole.PartAngle)
{