mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 10:25:36 -04:00
Override mousePressEvent to correctly handle selection filter.
This commit is contained in:
parent
16da0bd8d8
commit
69f488f07b
2 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
PartitionLabelsView::updateGeometries()
|
||||
{
|
||||
|
|
|
@ -66,6 +66,7 @@ protected:
|
|||
|
||||
void mouseMoveEvent( QMouseEvent* event ) override;
|
||||
void leaveEvent( QEvent* event ) override;
|
||||
void mousePressEvent( QMouseEvent* event ) override;
|
||||
|
||||
protected slots:
|
||||
void updateGeometries() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue