Adhoc: Start editing the server address from the current one

The static string was only initialized on the first call, so the text
editor (used where there's no native input dialog) showed whatever was
typed the first time, even after picking another server from the list.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-22 10:55:30 +02:00
1 parent bbe84de2fe
commit 8a7b64daa3
1 file changed
+2 -1
+2 -1
View File
@@ -867,7 +867,8 @@ void AskToEditCurrentServer(int requestToken, ScreenManager *screenManager) {
});
return;
}
static std::string editText = g_Config.sProAdhocServer;
static std::string editText;
editText = g_Config.sProAdhocServer;
TextEditPopupScreen *popupScreen = new TextEditPopupScreen(&editText, editText, n->T("Ad hoc server address"), 256);
if (System_GetPropertyBool(SYSPROP_KEYBOARD_IS_SOFT)) {
popupScreen->SetAlignTop(true);