diff --git a/ChangeLog b/ChangeLog index ec109629..0e16d225 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,10 +3,12 @@ 3.5.10git +- do not change the server list order if the mouse is over the table to + avoid selecting an incorrect server on a mouse double click (#293) - +TODO improve compact channels: smaller font size of name is too long diff --git a/src/connectdlg.cpp b/src/connectdlg.cpp index 2ce4471b..0261ae1d 100755 --- a/src/connectdlg.cpp +++ b/src/connectdlg.cpp @@ -786,16 +786,19 @@ void CConnectDlg::SetPingTimeAndNumClientsResult ( const CHostAddress& InetAddr, } // Update sorting. Note that the sorting must be the last action for the - // current item since the topLevelItem ( iIdx ) is then no longer valid. - if ( bDoSorting && !bShowCompleteRegList ) // do not sort if "show all servers" + // current item since the topLevelItem(iIdx) is then no longer valid. + // To avoid that the list is sorted shortly before a double click (which + // could lead to connecting an incorrect server) the sorting is disabled + // as long as the mouse is over the list (#293). + if ( bDoSorting && !bShowCompleteRegList && !lvwServers->underMouse() ) // do not sort if "show all servers" { lvwServers->sortByColumn ( 4, Qt::AscendingOrder ); } } // if no server item has children, do not show decoration - bool bAnyListItemHasChilds = false; - const int iServerListLen = lvwServers->topLevelItemCount(); + bool bAnyListItemHasChilds = false; + const int iServerListLen = lvwServers->topLevelItemCount(); for ( int iIdx = 0; iIdx < iServerListLen; iIdx++ ) {