From 6c02ff1012f3a4c41fb966ac49569c105b284b91 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Fri, 26 Aug 2011 01:27:16 +0000 Subject: [PATCH] (trunk web) when compact mode is toggled, force the torrent list to rebuild even if no torrents have changed --- web/javascript/transmission.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/javascript/transmission.js b/web/javascript/transmission.js index f2063e38e..eb3f99c8e 100644 --- a/web/javascript/transmission.js +++ b/web/javascript/transmission.js @@ -2006,7 +2006,7 @@ Transmission.prototype = Torrent.sortTorrents(keep, this[Prefs._SortMethod], this[Prefs._SortDirection]); // maybe rebuild the rows - if (!this.matchesTorrentList(keep)) + if (this._force_refilter || !this.matchesTorrentList(keep)) { var old_sel = this.getSelectedTorrents(); var new_sel_count = 0; @@ -2039,6 +2039,8 @@ Transmission.prototype = if (old_sel.length !== new_sel_count) this.selectionChanged(); + + delete this._force_refilter; } // sync gui @@ -2239,6 +2241,7 @@ Transmission.prototype = // update the ui: torrent list this.torrentRenderer = compact ? new TorrentRendererCompact() : new TorrentRendererFull(); + this._force_refilter = true; this.refilter(); } }; -- 2.40.0