return true;
}
+ const bool controlPressed = modifiers & Qt::ControlModifier;
const bool shiftOrControlPressed = modifiers & Qt::ShiftModifier ||
- modifiers & Qt::ControlModifier;
+ controlPressed;
KItemListRubberBand* rubberBand = m_view->rubberBand();
if (rubberBand->isActive()) {
Q_EMIT itemExpansionToggleClicked(index);
emitItemActivated = false;
- } else if (shiftOrControlPressed) {
- // The mouse click should only update the selection, not trigger the item
+ } else if (shiftOrControlPressed && m_selectionBehavior != SingleSelection) {
+ // The mouse click should only update the selection, not trigger the item, except when
+ // we are in single selection mode
emitItemActivated = false;
} else if (!(m_view->style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick) || m_singleClickActivationEnforced)) {
if (touch) {