Fix browser not refreshing if ui_page is changed in start menu

When changing `ui_page` via the console while the start menu is active, the browser tab was not refreshed when clicking the Play-button, leading to the old server list being shown for the new browser tab.
This commit is contained in:
Robert Müller 2024-06-24 21:22:06 +02:00
parent 0f61b173a8
commit 2974e5197e
2 changed files with 2 additions and 2 deletions

View file

@ -2354,7 +2354,7 @@ void CMenus::SetMenuPage(int NewPage)
if(NewPage >= PAGE_INTERNET && NewPage <= PAGE_FAVORITE_COMMUNITY_5)
{
g_Config.m_UiPage = NewPage;
if(!m_ShowStart && OldPage != NewPage)
if(OldPage != NewPage)
{
RefreshBrowserTab(false);
}

View file

@ -285,8 +285,8 @@ void CMenus::RenderStartMenu(CUIRect MainView)
if(NewPage != -1)
{
m_MenuPage = NewPage;
m_ShowStart = false;
SetMenuPage(NewPage);
}
}