From 34c4f7a4efcd99ef1501a6df6d612d927a8e75a8 Mon Sep 17 00:00:00 2001 From: chros Date: Wed, 6 Jul 2016 18:56:14 +0100 Subject: [PATCH] Fix filtering started and stopped views in rtorrent (See #19) --- patches/ps-fix-sort-started-stopped-views_all.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 patches/ps-fix-sort-started-stopped-views_all.patch diff --git a/patches/ps-fix-sort-started-stopped-views_all.patch b/patches/ps-fix-sort-started-stopped-views_all.patch new file mode 100644 index 00000000..a7a79241 --- /dev/null +++ b/patches/ps-fix-sort-started-stopped-views_all.patch @@ -0,0 +1,13 @@ +--- rel-0.9.6/src/core/view.cc 2015-09-03 20:03:30.000000000 +0100 ++++ rtorrent-0.9.6/src/core/view.cc 2016-07-06 17:13:47.180101179 +0100 +@@ -257,6 +257,10 @@ View::sort() { + + void + View::filter() { ++ // Do NOT allow filter STARTED and STOPPED views: they are special ++ if (m_name == "started" || m_name == "stopped") ++ return; ++ + // Parition the list in two steps so we know which elements changed. + iterator splitVisible = std::stable_partition(begin_visible(), end_visible(), view_downloads_filter(m_filter)); + iterator splitFiltered = std::stable_partition(begin_filtered(), end_filtered(), view_downloads_filter(m_filter));