]> granicus.if.org Git - transmission/commitdiff
(trunk web) when compact mode is toggled, force the torrent list to rebuild even...
authorJordan Lee <jordan@transmissionbt.com>
Fri, 26 Aug 2011 01:27:16 +0000 (01:27 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Fri, 26 Aug 2011 01:27:16 +0000 (01:27 +0000)
web/javascript/transmission.js

index f2063e38e962049093344c9950df91397800ab06..eb3f99c8e11c26f78ccdeb263d1fbe41e9cb0115 100644 (file)
@@ -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();
        }
 };