Bug 455802 - [Filters] RunNow becomes broken as number of filters increases; r=bienvenu
authorKent James (kent@caspia.com>
Sat, 20 Sep 2008 20:15:37 +0200
changeset 386 84b4e8431ca3ef8a1156368be8664c874078beb0
parent 385 7c6c4b32c099208e3c617ccd9e419bff7fce77d0
child 387 57c9550d7c9605d937dc7002e3e0405f821cfc1e
push idunknown
push userunknown
push dateunknown
reviewersbienvenu
bugs455802
Bug 455802 - [Filters] RunNow becomes broken as number of filters increases; r=bienvenu
mail/base/content/FilterListDialog.js
--- a/mail/base/content/FilterListDialog.js
+++ b/mail/base/content/FilterListDialog.js
@@ -334,18 +334,19 @@ function runSelectedFilters()
   var folders = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);
   folders.AppendElement(folder);
 
   // make sure the tmp filter list uses the real filter list log stream
   filterList.logStream = gCurrentFilterList.logStream;
   filterList.loggingEnabled = gCurrentFilterList.loggingEnabled;
 
   var list = document.getElementById("filterList");
+  var index = 0;
   for each (var item in list.selectedItems) {
-    filterList.insertFilterAt(list.getIndexOfItem(item), item._filter);
+    filterList.insertFilterAt(index++, item._filter);
   }
 
   filterService.applyFiltersToFolders(filterList, folders, gFilterListMsgWindow);
 }
 
 function moveCurrentFilter(motion)
 {
     var filter = currentFilter();