Fix a counting error in ReplaceMatch. r=danm, sr=waterson

This commit is contained in:
hyatt%netscape.com 2001-04-12 04:31:16 +00:00
Родитель 0f090f4836
Коммит 355c4b887b
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -916,7 +916,7 @@ nsXULOutlinerBuilder::ReplaceMatch(nsIRDFResource* aMember,
nsIRDFResource* container = VALUE_TO_IRDFRESOURCE(val);
PRInt32 row = 0;
PRInt32 row = -1;
nsOutlinerRows::Subtree* parent = nsnull;
if (container != mRows.GetRootResource()) {
@ -942,7 +942,7 @@ nsXULOutlinerBuilder::ReplaceMatch(nsIRDFResource* aMember,
}
else
parent = mRows.GetRoot();
if (parent) {
// By default, place the new element at the end of the container
PRInt32 index = parent->Count();
@ -966,7 +966,7 @@ nsXULOutlinerBuilder::ReplaceMatch(nsIRDFResource* aMember,
}
mRows.InsertRowAt(aNewMatch, parent, index);
mBoxObject->RowCountChanged(row + index, +1);
mBoxObject->RowCountChanged(row + index + 1, +1);
}
}

Просмотреть файл

@ -916,7 +916,7 @@ nsXULOutlinerBuilder::ReplaceMatch(nsIRDFResource* aMember,
nsIRDFResource* container = VALUE_TO_IRDFRESOURCE(val);
PRInt32 row = 0;
PRInt32 row = -1;
nsOutlinerRows::Subtree* parent = nsnull;
if (container != mRows.GetRootResource()) {
@ -942,7 +942,7 @@ nsXULOutlinerBuilder::ReplaceMatch(nsIRDFResource* aMember,
}
else
parent = mRows.GetRoot();
if (parent) {
// By default, place the new element at the end of the container
PRInt32 index = parent->Count();
@ -966,7 +966,7 @@ nsXULOutlinerBuilder::ReplaceMatch(nsIRDFResource* aMember,
}
mRows.InsertRowAt(aNewMatch, parent, index);
mBoxObject->RowCountChanged(row + index, +1);
mBoxObject->RowCountChanged(row + index + 1, +1);
}
}