mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 333689 [@ nsCertTree::ToggleOpenState]
patch by gijskruitbosch+bugs@gmail.com r=kaie sr=neil
This commit is contained in:
parent
0a29c05c3f
commit
e28bd85b3d
@ -869,10 +869,11 @@ nsCertTree::ToggleOpenState(PRInt32 index)
|
||||
if (!mTreeArray)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
treeArrayEl *el = GetThreadDescAtIndex(index);
|
||||
if (el) el->open = !el->open;
|
||||
PRInt32 fac = (el->open) ? 1 : -1;
|
||||
if (mTree) mTree->RowCountChanged(index, fac * el->numChildren);
|
||||
mSelection->Select(index);
|
||||
if (el) {
|
||||
el->open = !el->open;
|
||||
PRInt32 newChildren = (el->open) ? el->numChildren : -el->numChildren;
|
||||
if (mTree) mTree->RowCountChanged(index + 1, newChildren);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user