Test out awful hack to try to make selection work properly.

main
Teo Mrnjavac 9 years ago
parent 3fc354284a
commit f154a135d8

@ -416,8 +416,10 @@ PartitionBarsView::isIndexHidden( const QModelIndex& index ) const
void void
PartitionBarsView::setSelection( const QRect& rect, QItemSelectionModel::SelectionFlags flags ) PartitionBarsView::setSelection( const QRect& rect, QItemSelectionModel::SelectionFlags flags )
{ {
cDebug() << "About to call indexAt with point" << rect.topLeft(); int x1, y1, x2, y2;
selectionModel()->setCurrentIndex( indexAt( rect.topLeft() ), flags ); rect.getCoords( &x1, &y1, &x2, &y2 );
cDebug() << "Actual click point is" << x2 << y2;
selectionModel()->setCurrentIndex( indexAt( QPoint( x2, y2 ) ), flags );
cDebug() << "selected items count:" << selectedIndexes().count(); cDebug() << "selected items count:" << selectedIndexes().count();
QStringList itemstrings; QStringList itemstrings;
foreach( const QModelIndex& ind, selectedIndexes() ) foreach( const QModelIndex& ind, selectedIndexes() )

Loading…
Cancel
Save