|
|
|
@ -282,23 +282,27 @@ PartitionBarsView::indexAt( const QPoint &point,
|
|
|
|
|
width - 2 * EXTENDED_PARTITION_MARGIN,
|
|
|
|
|
rect.height() - 2 * EXTENDED_PARTITION_MARGIN
|
|
|
|
|
);
|
|
|
|
|
cDebug() << "Item" << item.index.data().toString() << "has children;"
|
|
|
|
|
<< "its children subrect is" << subRect << ". We look for point"
|
|
|
|
|
<< point;
|
|
|
|
|
if ( subRect.contains( point ) )
|
|
|
|
|
{
|
|
|
|
|
cDebug() << "EXTENDED partition subrect contains point!";
|
|
|
|
|
cDebug() << "point:" << point
|
|
|
|
|
<< "\t\trect:" << subRect
|
|
|
|
|
<< "\t\tindex:" << item.index.data();
|
|
|
|
|
<< "\t\tindex:" << item.index.data().toString();
|
|
|
|
|
return indexAt( point, subRect, item.index );
|
|
|
|
|
}
|
|
|
|
|
cDebug() << "point:" << point
|
|
|
|
|
<< "\t\trect:" << thisItemRect
|
|
|
|
|
<< "\t\tindex:" << item.index.data();
|
|
|
|
|
<< "\t\tindex:" << item.index.data().toString();
|
|
|
|
|
return item.index;
|
|
|
|
|
}
|
|
|
|
|
else // contains but no children, we win
|
|
|
|
|
{
|
|
|
|
|
cDebug() << "point:" << point
|
|
|
|
|
<< "\t\trect:" << thisItemRect
|
|
|
|
|
<< "\t\tindex:" << item.index.data();
|
|
|
|
|
<< "\t\tindex:" << item.index.data().toString();
|
|
|
|
|
return item.index;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -412,6 +416,7 @@ PartitionBarsView::isIndexHidden( const QModelIndex& index ) const
|
|
|
|
|
void
|
|
|
|
|
PartitionBarsView::setSelection( const QRect& rect, QItemSelectionModel::SelectionFlags flags )
|
|
|
|
|
{
|
|
|
|
|
cDebug() << "About to call indexAt with point" << rect.topLeft();
|
|
|
|
|
selectionModel()->setCurrentIndex( indexAt( rect.topLeft() ), flags );
|
|
|
|
|
cDebug() << "selected items count:" << selectedIndexes().count();
|
|
|
|
|
QStringList itemstrings;
|
|
|
|
|