From 2dd570c880662d9477be384f97a500f56b12ba67 Mon Sep 17 00:00:00 2001 From: rog Date: Mon, 24 Dec 2012 13:29:19 -0500 Subject: [PATCH] Should completely fix game list sorting. --- Source/Core/DolphinWX/Src/GameListCtrl.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index 49f8512f8d..546f086167 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -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); }