[spots] Restore custom spot colors on launch#1133
Conversation
There was a problem hiding this comment.
Good fix — clean, minimal, and exactly right.
The three new lines slot neatly into the existing { auto& s = AppSettings::instance(); ... } block in wirePanadapter(), so they share the same settings reference and stay inside the same scope as the surrounding restore calls. Key names (SpotsOverrideColor, SpotsOverrideBgColor, SpotsBackgroundOpacity) and defaults (#FFFF00, #000000, 48) match exactly what SpotSettingsDialog and DxClusterDialog write, so round-trip fidelity is correct.
No null-pointer risk beyond what sw already assumes (the pointer is dereferenced unconditionally at line 4892, so the new calls are consistent with existing behavior). No scope creep — only MainWindow.cpp, only the startup restore path.
Thanks for tracking this down and submitting a focused fix, @jensenpat!
Summary
Root Cause
The startup path restored the override booleans but did not reapply the saved custom spot colors and background opacity to newly created spectrum widgets, so they fell back to defaults until a later refresh path ran.
Validation