www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit e82a56bb4c9cb6819457c05543a1ac37eb0f08b8
parent a6b8633f2e88607c2e7046eade2f88c04f1784a4
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri,  4 Mar 2011 07:39:35 +0000

Fix Zotero crash if last collection before a separator was deleted


Diffstat:
Mchrome/content/zotero/xpcom/collectionTreeView.js | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -868,10 +868,16 @@ Zotero.CollectionTreeView.prototype.deleteSelection = function() } this._treebox.endUpdateBatch(); - if(end.value < this.rowCount) + if (end.value < this.rowCount) { + var row = this._getItemAtRow(end.value); + if (row.isSeparator()) { + return; + } this.selection.select(end.value); - else + } + else { this.selection.select(this.rowCount-1); + } } /*