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)
This commit is contained in:
parent
d2654e18da
commit
4f256bef70
2 changed files with 10 additions and 5 deletions
|
@ -3,10 +3,12 @@
|
||||||
|
|
||||||
3.5.10git
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -786,16 +786,19 @@ void CConnectDlg::SetPingTimeAndNumClientsResult ( const CHostAddress& InetAddr,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update sorting. Note that the sorting must be the last action for the
|
// Update sorting. Note that the sorting must be the last action for the
|
||||||
// current item since the topLevelItem ( iIdx ) is then no longer valid.
|
// current item since the topLevelItem(iIdx) is then no longer valid.
|
||||||
if ( bDoSorting && !bShowCompleteRegList ) // do not sort if "show all servers"
|
// 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 );
|
lvwServers->sortByColumn ( 4, Qt::AscendingOrder );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if no server item has children, do not show decoration
|
// if no server item has children, do not show decoration
|
||||||
bool bAnyListItemHasChilds = false;
|
bool bAnyListItemHasChilds = false;
|
||||||
const int iServerListLen = lvwServers->topLevelItemCount();
|
const int iServerListLen = lvwServers->topLevelItemCount();
|
||||||
|
|
||||||
for ( int iIdx = 0; iIdx < iServerListLen; iIdx++ )
|
for ( int iIdx = 0; iIdx < iServerListLen; iIdx++ )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue