summaryrefslogtreecommitdiff
path: root/src/gui/search/SearchModel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/search/SearchModel.h')
-rw-r--r--src/gui/search/SearchModel.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/search/SearchModel.h b/src/gui/search/SearchModel.h
index 0fe9480..61f51d0 100644
--- a/src/gui/search/SearchModel.h
+++ b/src/gui/search/SearchModel.h
@@ -61,7 +61,13 @@ public:
vector<SaveInfo*> GetSaveList();
vector<pair<string, int> > GetTagList();
string GetLastError() { return lastError; }
- int GetPageCount() { return max(1, (int)(ceil(resultCount/16.0f))); }
+ int GetPageCount()
+ {
+ if (!showOwn && !showFavourite && currentSort == "best" && lastQuery == "")
+ return max(1, (int)(ceil((resultCount+5)/20.0f)));
+ else
+ return max(1, (int)(ceil(resultCount/20.0f)));
+ }
int GetPageNum() { return currentPage; }
std::string GetLastQuery() { return lastQuery; }
void SetSort(string sort) { if(!updateSaveListWorking) { currentSort = sort; } notifySortChanged(); }