Use currentIndex instead of selection.

This commit is contained in:
Teo Mrnjavac 2015-12-11 19:20:39 +01:00
parent 99a5ac8e4d
commit 8acb70de5c

View File

@ -412,7 +412,7 @@ PartitionBarsView::isIndexHidden( const QModelIndex& index ) const
void
PartitionBarsView::setSelection( const QRect& rect, QItemSelectionModel::SelectionFlags flags )
{
selectionModel()->select( indexAt( rect.topLeft() ), flags );
selectionModel()->setCurrentIndex( indexAt( rect.topLeft() ), flags );
cDebug() << "selected items count:" << selectedIndexes().count();
QStringList itemstrings;
foreach( const QModelIndex& ind, selectedIndexes() )