зеркало из https://github.com/mozilla/pjs.git
Bug 333689 [@ nsCertTree::ToggleOpenState]
patch by gijskruitbosch+bugs@gmail.com r=kaie sr=neil
This commit is contained in:
Родитель
51210a6fce
Коммит
e1804d6436
|
@ -869,10 +869,11 @@ nsCertTree::ToggleOpenState(PRInt32 index)
|
||||||
if (!mTreeArray)
|
if (!mTreeArray)
|
||||||
return NS_ERROR_NOT_INITIALIZED;
|
return NS_ERROR_NOT_INITIALIZED;
|
||||||
treeArrayEl *el = GetThreadDescAtIndex(index);
|
treeArrayEl *el = GetThreadDescAtIndex(index);
|
||||||
if (el) el->open = !el->open;
|
if (el) {
|
||||||
PRInt32 fac = (el->open) ? 1 : -1;
|
el->open = !el->open;
|
||||||
if (mTree) mTree->RowCountChanged(index, fac * el->numChildren);
|
PRInt32 newChildren = (el->open) ? el->numChildren : -el->numChildren;
|
||||||
mSelection->Select(index);
|
if (mTree) mTree->RowCountChanged(index + 1, newChildren);
|
||||||
|
}
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче