www

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

commit 5f82db09705bb6f78af7c741409cc9843af982a0
parent 226196a265ab68569ecbc511348b3899cbbe8d48
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed,  5 Oct 2011 17:52:22 +0000

Ensure library is visible when selecting


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

diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -692,6 +692,7 @@ Zotero.CollectionTreeView.prototype.selectLibrary = function (libraryID) { // Select local library if (!libraryID) { + this._treebox.ensureRowIsVisible(0); this.selection.select(0); return true; } @@ -700,6 +701,7 @@ Zotero.CollectionTreeView.prototype.selectLibrary = function (libraryID) { if (this.selection.currentIndex != -1) { var itemGroup = this._getItemAtRow(this.selection.currentIndex); if (itemGroup.isLibrary(true) && itemGroup.ref.libraryID == libraryID) { + this._treebox.ensureRowIsVisible(this.selection.currentIndex); return true; } } @@ -716,6 +718,7 @@ Zotero.CollectionTreeView.prototype.selectLibrary = function (libraryID) { } if (itemGroup.ref && itemGroup.ref.libraryID == libraryID) { + this._treebox.ensureRowIsVisible(i); this.selection.select(i); return true; }