mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 80543 -- outliner RowCountChanged behaving incorrectly on row removal. r=sspitzer, sr=hyatt.
This commit is contained in:
parent
1f8f87f711
commit
b1fd88de8e
@ -1179,13 +1179,14 @@ NS_IMETHODIMP nsOutlinerBodyFrame::RowCountChanged(PRInt32 aIndex, PRInt32 aCoun
|
||||
else if (aCount < 0) {
|
||||
if (mTopRowIndex > aIndex+count-1) {
|
||||
// No need to invalidate. The remove happened
|
||||
// completely offscreen.
|
||||
// completely above us (offscreen).
|
||||
mTopRowIndex -= count;
|
||||
UpdateScrollbar();
|
||||
}
|
||||
else if (mTopRowIndex > aIndex) {
|
||||
else if (mTopRowIndex >= aIndex) {
|
||||
// This is a full-blown invalidate.
|
||||
mTopRowIndex = aIndex+count-1;
|
||||
if (mTopRowIndex + mPageCount > rowCount - 1)
|
||||
mTopRowIndex = PR_MAX(0, rowCount - 1 - mPageCount);
|
||||
UpdateScrollbar();
|
||||
Invalidate();
|
||||
}
|
||||
|
@ -1179,13 +1179,14 @@ NS_IMETHODIMP nsOutlinerBodyFrame::RowCountChanged(PRInt32 aIndex, PRInt32 aCoun
|
||||
else if (aCount < 0) {
|
||||
if (mTopRowIndex > aIndex+count-1) {
|
||||
// No need to invalidate. The remove happened
|
||||
// completely offscreen.
|
||||
// completely above us (offscreen).
|
||||
mTopRowIndex -= count;
|
||||
UpdateScrollbar();
|
||||
}
|
||||
else if (mTopRowIndex > aIndex) {
|
||||
else if (mTopRowIndex >= aIndex) {
|
||||
// This is a full-blown invalidate.
|
||||
mTopRowIndex = aIndex+count-1;
|
||||
if (mTopRowIndex + mPageCount > rowCount - 1)
|
||||
mTopRowIndex = PR_MAX(0, rowCount - 1 - mPageCount);
|
||||
UpdateScrollbar();
|
||||
Invalidate();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user