From 984d39f8cc6e2fd54c1a1b4aa217334f04a5e479 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 21 Jan 2012 19:43:36 +0000 Subject: [PATCH] Reset page on sort change --- src/search/SearchModel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index dbd675746..0ed7d86f8 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -34,9 +34,9 @@ public: int GetPageCount() { return max(1, (int)(ceil(resultCount/16))); } int GetPageNum() { return currentPage; } std::string GetLastQuery() { return lastQuery; } - void SetSort(string sort) { currentSort = sort; UpdateSaveList(currentPage, lastQuery); notifySortChanged(); } + void SetSort(string sort) { currentSort = sort; UpdateSaveList(1, lastQuery); notifySortChanged(); } string GetSort() { return currentSort; } - void SetShowOwn(bool show) { showOwn = show; UpdateSaveList(currentPage, lastQuery); notifyShowOwnChanged(); } + void SetShowOwn(bool show) { showOwn = show; UpdateSaveList(1, lastQuery); notifyShowOwnChanged(); } bool GetShowOwn() { return showOwn; } };