From f1044153285e0c226d2ec2cb240558592efcd795 Mon Sep 17 00:00:00 2001 From: upstream svn Date: Mon, 16 Mar 2009 08:27:41 +0100 Subject: [PATCH] Upstream tarball 9515 --- .svn-revision | 2 +- docs/Changelog | 2 ++ src/SearchListCtrl.cpp | 9 ++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.svn-revision b/.svn-revision index 6b4f6ad2..dcb81b5d 100644 --- a/.svn-revision +++ b/.svn-revision @@ -1 +1 @@ -9514 +9515 diff --git a/docs/Changelog b/docs/Changelog index 6a6f5a28..557386a9 100644 --- a/docs/Changelog +++ b/docs/Changelog @@ -57,6 +57,8 @@ Version 2.3.0 - The river knows. * Improved gaplist performance * Ported chat captchas (receive and send) and "Advanced Chat Spam Filter" from eMule + * Allow download of multiple search results if search list + is sorted by status (thanks to DarkNRG) Vollstrecker: * Unify copyright lines diff --git a/src/SearchListCtrl.cpp b/src/SearchListCtrl.cpp index 83028895..b3e7aa64 100644 --- a/src/SearchListCtrl.cpp +++ b/src/SearchListCtrl.cpp @@ -758,14 +758,21 @@ void CSearchListCtrl::DownloadSelected(int category) } } + // First process all selections (because they may be invalidated by UpdateResult() + // if list is sorted by status) + std::list searchFiles; long index = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); while (index > -1) { CSearchFile* file = (CSearchFile*)GetItemData(index); + searchFiles.push_back(file); CoreNotify_Search_Add_Download(file, category); - UpdateResult(file); UpdateAllRelativesColor(file, index); index = GetNextItem(index, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); } + // Then update the listcontrol + for (std::list::iterator it = searchFiles.begin(); it != searchFiles.end(); ++it) { + UpdateResult(*it); + } } -- 2.11.4.GIT