feat: wheel over RST; PSK Reporter keeps the band's window
The mouse wheel steps the RST fields — one S-unit on an RST or RS, one decibel on a digital report, up for a better one — in the entry strip and in the QSO editor. The dropdown beside them lists the reports worth having to hand, not all 41 decibels, so the wheel works on the value rather than walking the list. The listener is native and non-passive: React attaches onWheel passively, where preventDefault does nothing and the panel scrolls away under the field being adjusted. PSK Reporter, whole-band scope: clicking a decode reset the report count to zero. The window there is the BAND's — every FTx report on it, filtered by target only when the analysis is drawn — and it was emptied on every target change, throwing away an hour of evidence at the moment the operator asked the question it answers. The narrow scope still clears it: there the window is one station's, and keeping it would answer the new question with the old station's evidence.
This commit is contained in:
@@ -279,13 +279,9 @@ func (w *Watcher) Watch(target, mode string, dialHz int64) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
w.mu.Lock()
|
||||
// The window belongs to the target it was collected for. Keeping it across a
|
||||
// change would answer the new question with the old station's evidence.
|
||||
if changed {
|
||||
w.spots = w.spots[:0]
|
||||
w.dropWindowOfPreviousTarget()
|
||||
}
|
||||
w.mu.Unlock()
|
||||
|
||||
if err := w.resubscribe(client); err != nil {
|
||||
return err
|
||||
@@ -301,6 +297,28 @@ func (w *Watcher) Watch(target, mode string, dialHz int64) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// dropWindowOfPreviousTarget empties the collected window when it belonged to
|
||||
// the station being left behind.
|
||||
//
|
||||
// WHOSE WINDOW IS IT? Under the narrow scope the subscription IS the target —
|
||||
// three filters about one station — so the window is his, and keeping it across
|
||||
// a change would answer the new question with the old station's evidence.
|
||||
//
|
||||
// Under the band-wide scope it is the BAND's: every FTx report on it, filtered
|
||||
// by target only when the analysis is drawn. Clearing it there threw away an
|
||||
// hour of accumulated evidence on every click, and a panel that had been showing
|
||||
// hundreds of reports read zero — the operator clicking a decode to ask "can he
|
||||
// hear me" is the very moment that history is worth something, and it was being
|
||||
// deleted in order to answer the question.
|
||||
func (w *Watcher) dropWindowOfPreviousTarget() {
|
||||
w.mu.Lock()
|
||||
defer w.mu.Unlock()
|
||||
if w.cfg.Scope == ScopeBand {
|
||||
return
|
||||
}
|
||||
w.spots = w.spots[:0]
|
||||
}
|
||||
|
||||
// resubscribe replaces every filter with the ones the current target and scope
|
||||
// want. Takes the old ones down first: a target change that only ADDED filters
|
||||
// would leave the previous station's reports arriving for ever.
|
||||
|
||||
Reference in New Issue
Block a user