QmlOutline: Make sure that currently selected item is always visible

This commit is contained in:
Kai Koehne
2010-08-24 14:31:27 +02:00
parent 7b8bd6e193
commit 42708807a5

View File

@@ -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;
}