speed optimzation which leads to less audio drop outs if the connection dialog is opened during a connection

This commit is contained in:
Volker Fischer 2013-08-18 20:53:31 +00:00
parent e8b65b6c0d
commit 89a1ab3de9

View File

@ -429,8 +429,14 @@ void CConnectDlg::SetPingTimeAndNumClientsResult ( CHostAddress& InetAddr,
lvwServers->topLevelItem ( iIdx )->
setText ( 2, QString().setNum ( iNumClients ) );
// a ping time was received, set item to visible
lvwServers->topLevelItem ( iIdx )->setHidden ( false );
// a ping time was received, set item to visible (note that we have
// to check if the item is hidden, otherwise we get a lot of CPU
// usage by calling "setHidden(false)" even if the item was already
// visible)
if ( lvwServers->topLevelItem ( iIdx )->isHidden() )
{
lvwServers->topLevelItem ( iIdx )->setHidden ( false );
}
// update minimum ping time column (invisible, used for sorting) if
// the new value is smaller than the old value