diff --git a/chrome/chromeFiles/content/scholar/itemTreeView.js b/chrome/chromeFiles/content/scholar/itemTreeView.js index 983a8ea23..99c742b9a 100644 --- a/chrome/chromeFiles/content/scholar/itemTreeView.js +++ b/chrome/chromeFiles/content/scholar/itemTreeView.js @@ -191,20 +191,20 @@ Scholar.ItemTreeView.prototype.getCollectionID = function() //CALLED BY DATA LAYER ON CHANGE: Scholar.ItemTreeView.prototype.notify = function(action, type, ids) { - ids = Scholar.flattenArguments(ids); var madeChanges = false; this.selection.selectEventsSuppressed = true; this.saveSelection(); - if(action == 'remove') + 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 var rows = new Array(); for(var i=0, len=ids.length; i 0) @@ -222,32 +222,24 @@ Scholar.ItemTreeView.prototype.notify = function(action, type, ids) } } - else + else if(action == 'modify') //must check for null because it could legitimately be 0 { - for (var i=0, len=ids.length; i