Skip to content

VfoWidget: clear orphaned Slice<N>_MarkerThin key after migration#2156

Merged
ten9876 merged 1 commit intoten9876:mainfrom
mvanhorn:osc/2143-remove-marker-thin-key
Apr 30, 2026
Merged

VfoWidget: clear orphaned Slice<N>_MarkerThin key after migration#2156
ten9876 merged 1 commit intoten9876:mainfrom
mvanhorn:osc/2143-remove-marker-thin-key

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

Resolves #2143.

#2141 migrated per-slice marker-style preferences from Slice<N>_MarkerThin (bool) to Slice<N>_MarkerWidth (int 0/1/3). loadDisplayPrefs() reads the old key only as a fallback when the new key is absent, but never deletes it — so the orphan accumulates in ~/.config/AetherSDR/AetherSDR.settings indefinitely.

Change

After migrating the value into m_markerWidth, remove the old key so subsequent saveDisplayPrefs() calls don't carry the orphan forward:

} else {
    // Migrate from the old MarkerThin bool: True (thin) → 1, False (thick) → 3.
    m_markerWidth = (s.value(keyT, "False").toString() == "True") ? 1 : 3;
    if (s.contains(keyT))
        s.remove(keyT);
}

The remove only fires once per slice (the next load will already see keyW and skip the else branch entirely), so this is a one-time cleanup per settings file.

The next saveDisplayPrefs() call (or the first one after this load) writes the new layout without the orphan, matching the issue's "save once on the next opportunity" approach.

Tiny single-file fix as flagged in the issue.

Resolves ten9876#2143.

ten9876#2141 migrated per-slice marker-style preferences from
`Slice<N>_MarkerThin` (bool) to `Slice<N>_MarkerWidth` (int 0/1/3).
`loadDisplayPrefs()` reads the old key only as a fallback when the new
key is absent, but never deletes it -- so the orphan accumulates in
`~/.config/AetherSDR/AetherSDR.settings` indefinitely.

After migrating the value into `m_markerWidth`, remove the old key so
subsequent `saveDisplayPrefs()` calls don't carry the orphan forward.
The remove only fires once per slice (the next load will already see
`keyW` and skip the else branch entirely), so this is a one-time
cleanup per setting file.

Tiny single-file fix as flagged in the issue.
@ten9876 ten9876 merged commit a8efaed into ten9876:main Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove orphaned Slice<N>_MarkerThin AppSettings key after migration

2 participants