Optimize seekChanged in FunctionsModel #498

This commit is contained in:
Florian Märkl 2018-05-25 20:55:05 +02:00
parent 0cea9e3287
commit 49dabaab71

View File

@ -256,8 +256,14 @@ void FunctionModel::setNested(bool nested)
void FunctionModel::seekChanged(RVA) void FunctionModel::seekChanged(RVA)
{ {
int previousIndex = currentIndex;
if (updateCurrentIndex()) { if (updateCurrentIndex()) {
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1)); if (previousIndex >= 0) {
emit dataChanged(index(previousIndex, 0), index(previousIndex, columnCount() - 1));
}
if (currentIndex >= 0) {
emit dataChanged(index(currentIndex, 0), index(currentIndex, columnCount() - 1));
}
} }
} }