Do the same in PartitionBarsView.

This commit is contained in:
Teo Mrnjavac 2016-01-15 18:35:19 +01:00
parent 69f488f07b
commit 051282d9bf
2 changed files with 12 additions and 0 deletions

View File

@ -477,6 +477,17 @@ PartitionBarsView::leaveEvent( QEvent* event )
}
void
PartitionBarsView::mousePressEvent( QMouseEvent* event )
{
QModelIndex candidateIndex = indexAt( event->pos() );
if ( canBeSelected( candidateIndex ) )
QAbstractItemView::mousePressEvent( event );
else
event->accept();
}
void
PartitionBarsView::updateGeometries()
{

View File

@ -64,6 +64,7 @@ protected:
void mouseMoveEvent( QMouseEvent* event ) override;
void leaveEvent( QEvent* event ) override;
void mousePressEvent( QMouseEvent* event ) override;
protected slots:
void updateGeometries() override;