Display layout: keep the overlay on Reset

Reset is about size, position and aspect. The overlay is a separate choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QGBg32EFPsTXjAFu7dnTcz
This commit is contained in:
LunaMooandClaude Opus 5.5 committed 2026-10-22 14:09:58 +02:00
1 parent 519f282f99
commit c986b4000f
1 file changed
+3
+3
View File
@@ -329,7 +329,10 @@ void DisplayLayoutScreen::CreateViews() {
Choice *center = new Choice(di->T("Reset"));
center->OnClick.Add([this, &config, portrait](UI::EventParams &) {
// Hm, not really ideal to have to use strings here.
// The overlay is a choice of its own, not part of the size/position, so keep it.
const std::string overlay = config.sOverlay;
config.ResetToDefault(portrait ? "DisplayLayout.Portrait" : "DisplayLayout.Landscape");
config.sOverlay = overlay;
// Which checkboxes are shown depends on the rotation.
RecreateViews();
});