From 1ca39e1e7dc3659e4cb16aff515f30acfe88850d Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 9 Mar 2013 11:49:49 -0500 Subject: [PATCH] allow new searches even if tags haven't loaded fixes search buttons being enabled but not working until the tags list is loaded --- src/search/SearchModel.cpp | 4 ++-- src/search/SearchModel.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp index 913e95bd7..f4de2d6c9 100644 --- a/src/search/SearchModel.cpp +++ b/src/search/SearchModel.cpp @@ -64,7 +64,7 @@ void * SearchModel::updateTagListT() void SearchModel::UpdateSaveList(int pageNumber, std::string query) { //Threading - if(!updateSaveListWorking && !updateTagListWorking) + if(!updateSaveListWorking) { lastQuery = query; lastError = ""; @@ -84,7 +84,7 @@ void SearchModel::UpdateSaveList(int pageNumber, std::string query) selected.clear(); notifySelectedChanged(); - if(GetShowTags() && !tagList.size()) + if(GetShowTags() && !tagList.size() && !updateTagListWorking) { updateTagListFinished = false; updateTagListWorking = true; diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index 9e93f0585..0fe948017 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -48,7 +48,7 @@ private: bool updateTagListWorking; volatile bool updateTagListFinished; pthread_t updateTagListThread; - static void * updateTagListTHelper(void * obj); + static void * updateTagListTHelper(void * obj); void * updateTagListT(); public: SearchModel();