Skip to content

Commit

Permalink
Fix filtering started and stopped views in rtorrent (See #19) (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
chros73 authored and pyroscope committed Mar 12, 2017
1 parent 13f9e0b commit ff4b784
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions patches/ps-fix-sort-started-stopped-views_all.patch
Original file line number Diff line number Diff line change
@@ -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));

0 comments on commit ff4b784

Please sign in to comment.