Put the wiped entry boxes back on Alt+W

N1MM wipes on Ctrl+W and puts the boxes back on Alt+W, which this had no
key for. A wipe now keeps the call, the exchange, the name, the comment
and the sent time, and Alt+W fills them in again.

Wiping empty boxes keeps what the wipe before it held, and the boxes are
only filled in again when they are empty, so nothing typed since the wipe
is thrown away. A call moved onto the call stack is not kept: it has not
gone anywhere and putting it back would make a second copy of it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015NZkFxHde1iifAQemFTHxf
This commit is contained in:
2026-09-10 11:17:41 +00:00
co-authored by Claude Opus 5
parent ab9730b26d
commit 24542b8355
6 changed files with 162 additions and 12 deletions
+1
View File
@@ -71,6 +71,7 @@
</MenuItem>
<MenuItem Header="_Edit">
<MenuItem Header="Wipe Out Entry Fields" Click="OnWipe" InputGesture="Ctrl+W" />
<MenuItem Header="Restore Wiped Entry Fields" Click="OnRestoreWiped" InputGesture="Alt+W" />
<Separator />
<MenuItem Header="Edit Last Contact" Click="OnEditLastContact" InputGesture="Ctrl+Y" />
<MenuItem Header="Add a Note to Last/Current Contact" Click="OnAddNote" InputGesture="Ctrl+N" />
@@ -388,6 +388,10 @@ public sealed partial class EntryWindow : Window
e.Handled = true;
OnWipe(this, new RoutedEventArgs());
break;
case Key.W when e.KeyModifiers.HasFlag(KeyModifiers.Alt):
e.Handled = true;
OnRestoreWiped(this, new RoutedEventArgs());
break;
case Key.L when e.KeyModifiers.HasFlag(KeyModifiers.Control):
e.Handled = true;
OnShowLog(this, new RoutedEventArgs());
@@ -682,6 +686,26 @@ public sealed partial class EntryWindow : Window
Refresh();
}
/// N1MM's Alt+W: the boxes the last wipe cleared are filled in again. With
/// something typed in them there is nowhere to put it back, so the status
/// line says so rather than throwing the typing away.
private void OnRestoreWiped(object? sender, RoutedEventArgs e)
{
if (Logging is null)
{
return;
}
if (!Logging.RestoreWiped())
{
Status(Logging.Entry.IsEmpty ? "no wiped contact to put back" : "wipe the boxes first");
return;
}
ResetEsm();
SyncBoxes();
boxes[0].Focus();
Refresh();
}
private void OnLogIt(object? sender, RoutedEventArgs e) => LogContact();
/// Opens the callsign's page in a browser, as N1MM's QRZ button does.