debugger: better positioning of current entry when deleting breakpoints

This commit is contained in:
hjk
2010-01-15 12:22:21 +01:00
parent 389033d038
commit b4e99074af

View File

@@ -282,7 +282,7 @@ void BreakWindow::deleteBreakpoints(QList<int> list)
for (int i = list.size(); --i >= 0; )
emit breakpointDeleted(list.at(i));
const int row = qMax(firstRow, model()->rowCount() - list.size() - 1);
const int row = qMin(firstRow, model()->rowCount() - 1);
if (row >= 0)
setCurrentIndex(model()->index(row, 0));
}