From 5f82db09705bb6f78af7c741409cc9843af982a0 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 5 Oct 2011 17:52:22 +0000 Subject: [PATCH] Ensure library is visible when selecting --- chrome/content/zotero/xpcom/collectionTreeView.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js index 605c686b4..b80b19a69 100644 --- 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; }