Skip to content
Snippets Groups Projects
Commit 0f8a491e authored by Kai Koehne's avatar Kai Koehne
Browse files

Make sure current index is always visible in Outline QTreeViews

parent 8acde74d
No related branches found
No related tags found
No related merge requests found
......@@ -105,6 +105,7 @@ void CppOutlineWidget::updateSelectionInTree(const QModelIndex &index)
qDebug() << "CppOutline - updating selection due to cursor move";
m_treeView->selectionModel()->select(proxyIndex, QItemSelectionModel::ClearAndSelect);
m_treeView->scrollTo(proxyIndex);
m_blockCursorSync = false;
}
......
......@@ -337,6 +337,7 @@ void QmlJSOutlineWidget::updateSelectionInTree()
m_blockCursorSync = true;
m_treeView->selectionModel()->select(index, QItemSelectionModel::ClearAndSelect);
m_treeView->scrollTo(index);
m_blockCursorSync = false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment