From 617eccb74c24e24cae9e44f29a825662529e297f Mon Sep 17 00:00:00 2001 From: oy Date: Fri, 16 Nov 2018 18:30:19 +0100 Subject: [PATCH] fixed selected server when opening a different filter or switching between global and lan --- src/game/client/components/menus_browser.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index a9ca670d6..0ed5c3a5c 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -1225,13 +1225,10 @@ void CMenus::RenderServerbrowserServerList(CUIRect View) const CServerInfo *pItem = pFilter->SortedGet(i); // select server - if(m_SelectedServer.m_Filter == -1 || m_SelectedServer.m_Filter == s) + if(!str_comp(pItem->m_aAddress, g_Config.m_UiServerAddress)) { - if(!str_comp(pItem->m_aAddress, g_Config.m_UiServerAddress)) - { - m_SelectedServer.m_Filter = s; - m_SelectedServer.m_Index = i; - } + m_SelectedServer.m_Filter = s; + m_SelectedServer.m_Index = i; } if(!m_SidebarActive && m_SelectedServer.m_Filter == s && m_SelectedServer.m_Index == i)