feat: While importing ADIF, can import default QSL confirmation

as well as My working conditions, locator, owner callsign
This commit is contained in:
2026-06-22 13:03:57 +02:00
parent 572e8ca538
commit 9b0d7ce1dc
+17
View File
@@ -1703,6 +1703,20 @@ func (a *App) applyStationDefaults(q *qso.QSO, includeIdentity bool) {
if q.MyPOTARef == "" {
q.MyPOTARef = p.MyPOTARef
}
// Per-band rig/antenna from Operating conditions (the antenna ticked as
// DEFAULT for this band) — the same auto-fill the entry strip does, applied
// here so imported QSOs get MY_RIG / MY_ANTENNA from the band defaults.
if a.operating != nil && q.Band != "" && (q.MyRig == "" || q.MyAntenna == "") {
if d, ok, _ := a.operating.BandDefault(a.ctx, p.ID, q.Band); ok {
if q.MyRig == "" {
q.MyRig = d.StationName
}
if q.MyAntenna == "" {
q.MyAntenna = d.AntennaName
}
}
}
// Fall back to the profile's static rig/antenna for anything still empty.
if q.MyRig == "" {
q.MyRig = p.MyRig
}
@@ -3569,6 +3583,9 @@ func (a *App) ImportADIF(path string, dupMode string, applyCty bool, applyStatio
// Backfill empty MY_* descriptive fields from the active profile
// (identity fields left alone to keep mixed-call routing intact).
a.applyStationDefaults(q, false)
// Also stamp the default QSL/LoTW/eQSL confirmation statuses on
// any that are still empty (same defaults new QSOs get).
a.applyQSLDefaults(q)
}
}
}