Skip to content

Fix settings restart prompt lost after language/skin change - #5072

Open
QueryOfficial wants to merge 1 commit into
multitheftauto:masterfrom
QueryOfficial:fix-settings-restart-prompt-locale
Open

Fix settings restart prompt lost after language/skin change#5072
QueryOfficial wants to merge 1 commit into
multitheftauto:masterfrom
QueryOfficial:fix-settings-restart-prompt-locale

Conversation

@QueryOfficial

@QueryOfficial QueryOfficial commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Persist the settings "restart required" prompt across Interface tab locale/skin rebuilds so changing resolution (or other restart-required options) still prompts after switching language/skin.

Previously ShowRestartQuestion() showed a QuestionBox owned by MainMenu. Changing language or skin destroys and recreates MainMenu, which dropped that prompt. The restart requirement is now tracked on CLocalGUI and re-shown after the UI rebuild.

Motivation

Fixes #5063
When a user changed screen resolution in Video settings, then switched to the Interface tab and changed language (or skin), closing settings no longer asked to restart — even though the resolution change still required one.

Root cause: locale/skin changes call DestroyWindows() / CreateWindows(), which replaces MainMenu and its QuestionBox, so the restart dialog was lost and never restored.

Test plan

  1. Open Settings → Video → change resolution only → OK → restart prompt appears.
  2. Open Settings → Video → change resolution → Interface → change language → OK → after language reload, RESTART REQUIRED appears in the new language.
  3. Repeat step 2 with a skin change instead of language → restart prompt appears after the UI rebuild.
  4. Change language only (no restart-required setting) → no restart prompt.
  5. On the restart prompt, choose No → client continues; choose Yes → client restarts.
  6. Confirm dialog strings match the existing locale translations.

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

@FileEX FileEX added the bugfix Solution to a bug of any kind label Jul 23, 2026
@DateFTP

DateFTP commented Jul 23, 2026

Copy link
Copy Markdown

Thank you for fixing the bugfix, as I started encountering this bug with the latest 1.6 build. It's a good thing I added the issues to the bugfix wait list.

@QueryOfficial

Copy link
Copy Markdown
Contributor Author

Thank you for fixing the bugfix, as I started encountering this bug with the latest 1.6 build. It's a good thing I added the issues to the bugfix wait list.

I follow the issues created in my free time and try to address them as much as I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Solution to a bug of any kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings: restart prompt is lost when changing resolution then switching to Language/Interface tab

3 participants