Override mousePressEvent to correctly handle selection filter.
This commit is contained in:
parent
16da0bd8d8
commit
69f488f07b
@ -564,6 +564,17 @@ PartitionLabelsView::leaveEvent( QEvent* event )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
PartitionLabelsView::mousePressEvent( QMouseEvent* event )
|
||||||
|
{
|
||||||
|
QModelIndex candidateIndex = indexAt( event->pos() );
|
||||||
|
if ( canBeSelected( candidateIndex ) )
|
||||||
|
QAbstractItemView::mousePressEvent( event );
|
||||||
|
else
|
||||||
|
event->accept();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PartitionLabelsView::updateGeometries()
|
PartitionLabelsView::updateGeometries()
|
||||||
{
|
{
|
||||||
|
@ -66,6 +66,7 @@ protected:
|
|||||||
|
|
||||||
void mouseMoveEvent( QMouseEvent* event ) override;
|
void mouseMoveEvent( QMouseEvent* event ) override;
|
||||||
void leaveEvent( QEvent* event ) override;
|
void leaveEvent( QEvent* event ) override;
|
||||||
|
void mousePressEvent( QMouseEvent* event ) override;
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void updateGeometries() override;
|
void updateGeometries() override;
|
||||||
|
Loading…
Reference in New Issue
Block a user