Use std::stable_sort to avoid destroying order when toggling IPv6

This commit is contained in:
Benau 2020-05-08 10:13:28 +08:00
parent 3d74dfea34
commit 0fc9e8dba8

View File

@ -204,7 +204,7 @@ void ServerSelection::init()
void ServerSelection::loadList()
{
m_server_list_widget->clear();
std::sort(m_servers.begin(), m_servers.end(), [this]
std::stable_sort(m_servers.begin(), m_servers.end(), [this]
(const std::shared_ptr<Server> a,
const std::shared_ptr<Server> b)->bool
{