From 531579e277f4a3a6f6caf837e150828a200d8539 Mon Sep 17 00:00:00 2001 From: "benjamin%smedbergs.us" Date: Tue, 18 Jul 2006 18:21:22 +0000 Subject: [PATCH] Bug 324856, r=bryner Send notifications for RemoveFolderChildren, update bugs. Original committer: brettw%gmail.com Original revision: 1.36 Original date: 2006/01/27 00:36:16 --- toolkit/components/places/src/nsNavHistoryResult.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/toolkit/components/places/src/nsNavHistoryResult.cpp b/toolkit/components/places/src/nsNavHistoryResult.cpp index 23394377bce..07608050e2e 100644 --- a/toolkit/components/places/src/nsNavHistoryResult.cpp +++ b/toolkit/components/places/src/nsNavHistoryResult.cpp @@ -1120,8 +1120,13 @@ nsNavHistoryContainerResultNode::RemoveChildAt(PRInt32 aIndex, if (AreChildrenVisible() && childVisibleIndex >= 0) result->RowsRemoved(childVisibleIndex, visibleRows); - if (! aIsTemporary) + if (! aIsTemporary) { ReverseUpdateStats(mAccessCount - oldAccessCount); + + // update our row (the twisty might have changed) + if (mVisibleIndex >= 0) + result->RowChanged(mVisibleIndex); + } return NS_OK; } @@ -4329,7 +4334,7 @@ nsNavHistoryResult::RowsRemoved(PRInt32 aVisibleIndex, PRUint32 aCount) NS_NOTREACHED("RowsRemoved should only be called when there is a tree"); return; } - if (aVisibleIndex < 0 || aVisibleIndex + aCount >= + if (aVisibleIndex < 0 || aVisibleIndex + aCount > mVisibleElements.Length()) { NS_NOTREACHED("Trying to remove invalid row"); return;