diff --git a/src/plugins/qmljseditor/qmljsoutline.cpp b/src/plugins/qmljseditor/qmljsoutline.cpp index cdb9530d8981272fc073ce9cc73f9a6a4351700d..ae2438942a10a58c478042b55bd148e07159d8ae 100644 --- a/src/plugins/qmljseditor/qmljsoutline.cpp +++ b/src/plugins/qmljseditor/qmljsoutline.cpp @@ -146,7 +146,7 @@ void QmlJSOutlineWidget::updateSelectionInTree(const QModelIndex &index) m_blockCursorSync = true; m_treeView->selectionModel()->select(m_filterModel->mapFromSource(index), QItemSelectionModel::ClearAndSelect); - m_treeView->scrollTo(index); + m_treeView->scrollTo(m_filterModel->mapFromSource(index), QTreeView::PositionAtCenter); m_blockCursorSync = false; }