diff --git a/chrome/chromeFiles/content/scholar/itemTreeView.js b/chrome/chromeFiles/content/scholar/itemTreeView.js index 2e45370b4..eadf1d402 100644 --- a/chrome/chromeFiles/content/scholar/itemTreeView.js +++ b/chrome/chromeFiles/content/scholar/itemTreeView.js @@ -84,10 +84,11 @@ Scholar.ItemTreeView.prototype.notify = function(action, type, ids) this.selection.selectEventsSuppressed = true; var savedSelection = this.saveSelection(); - + + ids = Scholar.flattenArguments(ids); + if((action == 'remove' && !this._itemGroup.isLibrary()) || (action == 'delete' && this._itemGroup.isLibrary())) { - ids = Scholar.flattenArguments(ids); //Since a remove involves shifting of rows, we have to do it in order //sort the ids by row @@ -116,8 +117,6 @@ Scholar.ItemTreeView.prototype.notify = function(action, type, ids) } else if(action == 'modify') //must check for null because it could legitimately be 0 { - ids = Scholar.flattenArguments(ids); - for(var i=0, len=ids.length; i