forked from qt-creator/qt-creator
Valgrind: Re-focus error view after cursor navigation
Change-Id: I4519a36107b7b2a8895d154fbcc7052aecb5d9c6 Task-number: QTCREATORBUG-15866 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -167,6 +167,12 @@ void DetailedErrorView::contextMenuEvent(QContextMenuEvent *e)
|
||||
menu.exec(e->globalPos());
|
||||
}
|
||||
|
||||
void DetailedErrorView::currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
|
||||
{
|
||||
QTreeView::currentChanged(current, previous);
|
||||
scrollTo(current);
|
||||
}
|
||||
|
||||
void DetailedErrorView::goNext()
|
||||
{
|
||||
QTC_ASSERT(rowCount(), return);
|
||||
@@ -208,7 +214,6 @@ void DetailedErrorView::setCurrentRow(int row)
|
||||
const QModelIndex index = model()->index(row, 0);
|
||||
selectionModel()->setCurrentIndex(index,
|
||||
QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
|
||||
scrollTo(index);
|
||||
}
|
||||
|
||||
} // namespace Debugger
|
||||
|
@@ -56,6 +56,7 @@ public:
|
||||
|
||||
private:
|
||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous) override;
|
||||
|
||||
int currentRow() const;
|
||||
void setCurrentRow(int row);
|
||||
|
Reference in New Issue
Block a user