Fill the zone box from the log and the country file on space

Without a call history file, the CQ zone box stayed empty after the
callsign. It now takes the zone from the call history file, else from the
last logged contact with the call, else from the country file, as N1MM
does. A box that already holds text is left alone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 05:24:56 +00:00
co-authored by Claude Sonnet 5.5
parent 072c04883e
commit 3a39b40edb
2 changed files with 59 additions and 8 deletions
@@ -482,6 +482,32 @@ public class OperatingPositionTests
Assert.Equal("25", session.Entry.ValueOf(ExchangeSlot.Zone));
}
/// N1MM suggests the country's zone when the call is settled.
[Fact]
public void TheCountryFileZoneFillsTheZoneBox()
{
OperatingPosition session = Session();
session.Entry.Call = "JA1XYZ";
Assert.True(session.FillFromHistory());
Assert.Equal("25", session.Entry.ValueOf(ExchangeSlot.Zone));
}
/// A zone copied on an earlier contact beats the country's own.
[Fact]
public void TheZoneLoggedBeforeBeatsTheCountryFileZone()
{
OperatingPosition session = Session();
Type(session, "DL1ABC", "40");
session.LogContact();
session.Wipe();
session.Entry.Call = "DL1ABC";
session.FillFromHistory();
Assert.Equal("40", session.Entry.ValueOf(ExchangeSlot.Zone));
}
/// A file for a section contest often carries the state instead.
[Fact]
public void TheStateFillsASectionWhenTheFileHasNoSection()