From 88e9d6a34c087c9ccab21303a32944fdda85356f Mon Sep 17 00:00:00 2001 From: Benau Date: Tue, 6 Mar 2018 14:40:29 +0800 Subject: [PATCH] Fix server selection screen loading dots --- src/states_screens/server_selection.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/states_screens/server_selection.cpp b/src/states_screens/server_selection.cpp index e8e01e81a..3576168a3 100644 --- a/src/states_screens/server_selection.cpp +++ b/src/states_screens/server_selection.cpp @@ -70,9 +70,6 @@ void ServerSelection::refresh() if (ServersManager::get()->refresh()) { m_server_list_widget->clear(); - m_server_list_widget->addItem("spacer", L""); - m_server_list_widget->addItem("loading", - StringUtils::loadingDots(_("Fetching servers"))); m_reload_widget->setActive(false); m_refreshing_server = true; } @@ -234,7 +231,7 @@ void ServerSelection::onUpdate(float dt) std::string selection_str = m_server_list_widget->getSelectionInternalName(); loadList(0); // restore previous selection - if (selection != -1 && selection_str != "spacer" && selection_str != "loading") + if (selection != -1 && selection_str != "loading") m_server_list_widget->setSelectionID(selection); } else @@ -245,5 +242,11 @@ void ServerSelection::onUpdate(float dt) } m_reload_widget->setActive(true); } + else + { + m_server_list_widget->clear(); + m_server_list_widget->addItem("loading", + StringUtils::loadingDots(_("Fetching servers"))); + } } // onUpdate