feat(cat): MY_RIG follows the radio that is connected
With one rig, MY_RIG belonged in Operating conditions and nowhere else. With several, that becomes the wrong place: operating conditions describe a PLAN — 'on 20 m I use the beam and the 7300' — while the question a logged QSO asks is which radio was keying. So each saved radio carries its own MY_RIG, consulted BEFORE the per-band station. When the two disagree — a second rig borrowed for one evening on 20 m — the one that is transmitting is the true answer. Left empty it changes nothing at all: the old chain (band default, then the profile's rig) answers exactly as it did, which is what every single-radio station will keep doing without touching a setting.
This commit is contained in:
@@ -3338,6 +3338,10 @@ func (a *App) applyStationDefaults(q *qso.QSO, includeIdentity bool) {
|
||||
// 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.
|
||||
// The radio that is CONNECTED names itself first — see activeRadioMyRig.
|
||||
if q.MyRig == "" {
|
||||
q.MyRig = a.activeRadioMyRig()
|
||||
}
|
||||
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 == "" {
|
||||
@@ -13401,7 +13405,12 @@ func (a *App) LogUDPLoggedADIF(adifText string) (int64, error) {
|
||||
|
||||
// ── Operating-conditions stamp ──
|
||||
// Pre-fill MY_RIG / MY_ANTENNA / TX_PWR from the default antenna for
|
||||
// this band (if the user has configured Operating conditions).
|
||||
// this band (if the user has configured Operating conditions) — after the
|
||||
// connected radio has had its say, since it knows which rig is keying and
|
||||
// the band default only knows which one was planned.
|
||||
if q.MyRig == "" {
|
||||
q.MyRig = a.activeRadioMyRig()
|
||||
}
|
||||
if a.operating != nil && a.profiles != nil {
|
||||
if p, err := a.profiles.Active(a.ctx); err == nil {
|
||||
if d, ok2, _ := a.operating.BandDefault(a.ctx, p.ID, q.Band); ok2 {
|
||||
|
||||
Reference in New Issue
Block a user