commit d78089d4b9cb70dcec61581154c1396730132cc7
parent afaaf20c90a1ef5381d458bc9cba3aacf92088ad
Author: Dan Stillman <dstillman@zotero.org>
Date: Thu, 7 Apr 2016 21:08:20 -0400
Properly update parent isOpen flag when removing child item at end of list
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/libraryTreeView.js b/chrome/content/zotero/xpcom/libraryTreeView.js
@@ -175,8 +175,7 @@ Zotero.LibraryTreeView.prototype = {
// Update isOpen if parent and no siblings
if (row != 0
&& this.getLevel(row - 1) < level
- && this._rows[row]
- && this.getLevel(row) != level) {
+ && (!this._rows[row] || this.getLevel(row) != level)) {
this._rows[row - 1].isOpen = false;
this._treebox.invalidateRow(row - 1);
}