Make touch tap to select items work in selection mode

Thanks to Steffen Hartleib for the help.
This commit is contained in:
Felix Ernst 2022-05-01 12:37:21 +02:00
parent 2e588733c7
commit eb7a2e18ed

View file

@ -1783,7 +1783,7 @@ bool KItemListController::onRelease(const QPointF& pos, const Qt::KeyboardModifi
} else { } else {
const bool singleClickActivation = m_view->style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick) || m_singleClickActivationEnforced; const bool singleClickActivation = m_view->style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick) || m_singleClickActivationEnforced;
if (!singleClickActivation) { if (!singleClickActivation) {
emitItemActivated = touch; emitItemActivated = touch && !m_selectionMode;
} else { } else {
// activate on single click only if we didn't come from a rubber band release // activate on single click only if we didn't come from a rubber band release
emitItemActivated = !rubberBandRelease; emitItemActivated = !rubberBandRelease;