Commit 6f6e0921 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Todo: Fix goToNext/Prev behavior



* Select whole row
* Jump to related location

Change-Id: I5b63345eea9a0d51949f206c67fb6ae52f09bb27
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 25389fcc
......@@ -123,12 +123,18 @@ bool TodoOutputPane::canPrevious() const
void TodoOutputPane::goToNext()
{
m_todoTreeView->selectionModel()->select(nextModelIndex(), QItemSelectionModel::SelectCurrent);
const QModelIndex nextIndex = nextModelIndex();
m_todoTreeView->selectionModel()->setCurrentIndex(nextIndex, QItemSelectionModel::SelectCurrent
| QItemSelectionModel::Rows);
todoTreeViewClicked(nextIndex);
}
void TodoOutputPane::goToPrev()
{
m_todoTreeView->selectionModel()->select(previousModelIndex(), QItemSelectionModel::SelectCurrent);
const QModelIndex prevIndex = previousModelIndex();
m_todoTreeView->selectionModel()->setCurrentIndex(prevIndex, QItemSelectionModel::SelectCurrent
| QItemSelectionModel::Rows);
todoTreeViewClicked(prevIndex);
}
void TodoOutputPane::setScanningScope(ScanningScope scanningScope)
......
......@@ -48,6 +48,7 @@ TodoOutputTreeView::TodoOutputTreeView(QWidget *parent) :
setFrameStyle(QFrame::NoFrame);
setSortingEnabled(true);
setAttribute(Qt::WA_MacShowFocusRect, false);
setSelectionBehavior(QTreeView::SelectRows);
header()->setResizeMode(QHeaderView::Interactive);
header()->setStretchLastSection(true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment