Should completely fix game list sorting.

This commit is contained in:
rog 2012-12-24 13:29:19 -05:00
parent da5e61b45b
commit 2dd570c880
1 changed files with 13 additions and 8 deletions

View File

@ -713,20 +713,25 @@ void CGameListCtrl::OnColumnClick(wxListEvent& event)
if(event.GetColumn() != COLUMN_BANNER)
{
int current_column = event.GetColumn();
if (last_column == current_column)
if (sorted)
{
last_sort = -last_sort;
if (last_column == current_column)
{
last_sort = -last_sort;
}
else
{
SConfig::GetInstance().m_ListSort2 = last_sort;
last_column = current_column;
last_sort = current_column;
}
SConfig::GetInstance().m_ListSort = last_sort;
}
else
{
if (sorted)
SConfig::GetInstance().m_ListSort2 = last_sort;
last_column = current_column;
last_sort = current_column;
last_column = current_column;
}
if (sorted)
SConfig::GetInstance().m_ListSort = last_sort;
caller = this;
SortItems(wxListCompare, last_sort);
}