mirror of
https://github.com/praktimarc/kst4contest.git
synced 2026-10-18 21:34:03 +02:00
* Commit settings fields only on a real edit, not when a tab opens Form.committed treated every onFocusChanged callback with "not focused" as the operator leaving the field. Compose also fires that callback once when the modifier is attached, so drawing a tab committed each of its committed fields: opening Colours wrote all six roles as overrides of themselves (shown as "changed", and after "Save settings" they hid the profile's stylesheet file for good), opening Beacon validated both templates and restarted the beacon timer, opening Notification re-committed the port and the spotter callsign. The field now commits only on a transition from focused to unfocused, or on Enter, and only when the draft differs from the stored value. A real edit still commits on leaving the field or on Enter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Lock the Station tab's login fields while a session exists StationTabState.loginFieldsEnabled was a plain field that nothing ever wrote and that Compose could not observe, so callsign, names, locator, password and both chat categories stayed editable while connected, although the running session does not pick up a change. The flag is now derived from the ON4KST connection state, read through a lambda over the main window's Compose state (MainWindowSurroundings), so the tab follows the session while it is open: the fields are locked for every state but DISCONNECTED and unlocked again after disconnecting. The screen-test helper fieldBeside now matches text fields by their editable text, because a disabled field offers no set-text action. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drop changelog entries for defects that never shipped The committed-field and login-field defects exist only in the Compose settings tabs, which are in neither v1.44.0 nor beta-v1.50.0-beta-001, so there is nothing for an operator to read about. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Compare committed fields with their last commit, not a stale value Form.committed skipped a commit when the draft equalled `stored`, the value the caller passed at its last composition. Most callers read it from plain preference getters, so nothing recomposes them after a commit: after Enter, `stored` still named the old value, and leaving the field committed the same entry again, restarting the beacon timer twice for one edit. The field now keeps the value it last committed in its own holder, compares the draft with that, and falls back to it on a refusal. The comparison is pluggable. The Colours tab compares the way PaletteOverrides normalises a colour (trimmed, case ignored), so retyping the shown colour in lower case no longer becomes an override of itself. Behaviour kept on purpose: Enter on an unchanged value commits nothing, so it neither restarts the beacon timer nor reports a stored value the rule refuses. A field removed while it holds the focus (tab switched, window closed) still commits a typed entry once, because Compose reports the cleared focus as a focus loss; a test now pins this, as it was before. Also: a test drives the Station tab's lock from ConnectionStateFeed through MainWindowSurroundings, the chain the application wires, and the Javadoc of openSettingsWindow is back above its own method. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Judge a committed field against the live stored value be6862c8 kept the value a field last committed in a holder keyed on `stored`. That holder could outlive the truth: the field commits 9 over 5, nothing recomposes the tab, a profile switch puts 5 back and the tab recomposes with 5 -- the same key -- so the holder still said 9. The field showed 9, the preference held 5, and leaving the field committed nothing, where main would have committed 9. Form.committed now takes `current`, the value stored right now, read when the field commits; the draft is judged against it and falls back to it on a refusal. The holder is gone. Right after a commit the getter already returns the new value, so Enter followed by leaving the field still commits once. Every caller passes its preference getter: both beacon templates, the beacon interval, the DX cluster port, the spotter callsign and the colour roles. `isUnchanged` must agree with what commit stores, which the KDoc now says. The interval and the port compare as the number stored, the spotter callsign ignoring case and surrounding blanks, the colours as PaletteOverrides normalises them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Require the live value in committed fields and compare the spotter call as stored Review follow-up. `current` has no default any more, so a future caller cannot silently bring back the stale comparison. The spotter call is compared after the same uppercase(ROOT) the commit applies, so a typed "X" against a stored "x" still commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>