diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-09-02 14:40:39 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-09-02 14:40:39 (GMT) |
| commit | b7616a91d860871a3e4ac46cba957633a93acb59 (patch) | |
| tree | 60c389a07c66b1f0676f29a6550c698fb4333872 /src | |
| parent | c9caade1c3a32f5ef9fde232fa5956b1b973a42c (diff) | |
| download | powder-b7616a91d860871a3e4ac46cba957633a93acb59.zip powder-b7616a91d860871a3e4ac46cba957633a93acb59.tar.gz | |
Prevent changing of sorting mode when results haven't loaded. Fixes #172
Diffstat (limited to 'src')
| -rw-r--r-- | src/search/SearchModel.h | 4 | ||||
| -rw-r--r-- | src/search/SearchView.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index 343e259..08f04b7 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -56,9 +56,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; notifySortChanged(); } + void SetSort(string sort) { if(!updateSaveListWorking) { currentSort = sort; } notifySortChanged(); } string GetSort() { return currentSort; } - void SetShowOwn(bool show) { if(show!=showOwn) { showOwn = show; } notifyShowOwnChanged(); } + void SetShowOwn(bool show) { if(!updateSaveListWorking) { if(show!=showOwn) { showOwn = show; } } notifyShowOwnChanged(); } bool GetShowOwn() { return showOwn; } void SetShowFavourite(bool show) { if(show!=showFavourite) { showFavourite = show; } notifyShowFavouriteChanged(); } bool GetShowFavourite() { return showFavourite; } diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index 1322c4b..422a040 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -417,9 +417,11 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) { nextButton->Enabled = false; previousButton->Enabled = false; + sortButton->Enabled = false; } else { + sortButton->Enabled = true; nextButton->Enabled = true; previousButton->Enabled = true; } |
