mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
Don't accept button press events as well as release when handling latches
This commit is contained in:
@@ -453,6 +453,8 @@ SourceDelegate::editorEvent ( QEvent* event, QAbstractItemModel* model, const QS
|
||||
QRect headphonesRect( option.rect.height() + 10, o.rect.bottom() - height, height, height );
|
||||
// tDebug() << "CHECKING CLICK RECT:" << headphonesRect;
|
||||
if ( headphonesRect.contains( ev->pos() ) )
|
||||
{
|
||||
if ( event->type() == QEvent::MouseButtonRelease )
|
||||
{
|
||||
if ( index.data( SourcesModel::LatchedOnRole ).toBool() )
|
||||
// unlatch
|
||||
@@ -460,6 +462,8 @@ SourceDelegate::editorEvent ( QEvent* event, QAbstractItemModel* model, const QS
|
||||
else
|
||||
emit latchOn( colItem->source() );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user