Try the forbidden cursor when hovering an unselectable partition.

This commit is contained in:
Teo Mrnjavac 2016-02-16 13:55:44 +01:00
parent 178b24e0b0
commit 1aa8279cf8

View File

@ -134,11 +134,15 @@ PartitionBarsView::drawSection( QPainter* painter, const QRect& rect_, int x, in
rect.adjust( 0, 0, -1, -1 ); rect.adjust( 0, 0, -1, -1 );
setCursor( Qt::ArrowCursor);
if ( selectionMode() != QAbstractItemView::NoSelection && // no hover without selection if ( selectionMode() != QAbstractItemView::NoSelection && // no hover without selection
m_hoveredIndex.isValid() && m_hoveredIndex.isValid() &&
index == m_hoveredIndex ) index == m_hoveredIndex )
{ {
painter->setBrush( color.lighter( 115 ) ); if ( canBeSelected( index ) )
painter->setBrush( color.lighter( 115 ) );
else
setCursor( Qt::ForbiddenCursor );
} }
else else
{ {