зеркало из https://github.com/mozilla/pjs.git
Bug 210638 Tree should be able to maintain the selection during a batch update r=varga sr=jag
This commit is contained in:
Родитель
ce6fe2f543
Коммит
af1b41e03b
|
@ -1708,22 +1708,22 @@ nsTreeBodyFrame::CreateTimer(const nsILookAndFeel::nsMetricID aID,
|
|||
|
||||
NS_IMETHODIMP nsTreeBodyFrame::RowCountChanged(PRInt32 aIndex, PRInt32 aCount)
|
||||
{
|
||||
if (mUpdateBatchNest)
|
||||
return NS_OK;
|
||||
|
||||
if (aCount == 0 || !mView)
|
||||
return NS_OK; // Nothing to do.
|
||||
|
||||
PRInt32 count = PR_ABS(aCount);
|
||||
PRInt32 rowCount;
|
||||
mView->GetRowCount(&rowCount);
|
||||
|
||||
// Adjust our selection.
|
||||
nsCOMPtr<nsITreeSelection> sel;
|
||||
mView->GetSelection(getter_AddRefs(sel));
|
||||
if (sel)
|
||||
sel->AdjustSelection(aIndex, aCount);
|
||||
|
||||
if (mUpdateBatchNest)
|
||||
return NS_OK;
|
||||
|
||||
PRInt32 count = PR_ABS(aCount);
|
||||
PRInt32 rowCount;
|
||||
mView->GetRowCount(&rowCount);
|
||||
|
||||
PRInt32 last;
|
||||
GetLastVisibleRow(&last);
|
||||
if (aIndex >= mTopRowIndex && aIndex <= last)
|
||||
|
|
Загрузка…
Ссылка в новой задаче