From 75ea43339e89a0f7a3c02e686ba4c7fd239fb24e Mon Sep 17 00:00:00 2001 From: Martin Koller Date: Fri, 21 Aug 2009 20:09:16 +0000 Subject: [PATCH] BUG: 150759 don't act on left/right cursor in a special way during selection (Shift pressed) svn path=/trunk/KDE/kdepim/; revision=1014188 --- recipientseditor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipientseditor.cpp b/recipientseditor.cpp index 850793f91..f99836ec7 100644 --- a/recipientseditor.cpp +++ b/recipientseditor.cpp @@ -134,9 +134,11 @@ void RecipientLineEdit::keyPressEvent( QKeyEvent *ev ) if ( ev->key() == Qt::Key_Backspace && text().isEmpty() ) { ev->accept(); emit deleteMe(); - } else if ( ev->key() == Qt::Key_Left && cursorPosition() == 0 ) { + } else if ( ev->key() == Qt::Key_Left && cursorPosition() == 0 && + !ev->modifiers().testFlag( Qt::ShiftModifier ) ) { // Shift would be pressed during selection emit leftPressed(); - } else if ( ev->key() == Qt::Key_Right && cursorPosition() == (int)text().length() ) { + } else if ( ev->key() == Qt::Key_Right && cursorPosition() == (int)text().length() && + !ev->modifiers().testFlag( Qt::ShiftModifier ) ) { // Shift would be pressed during selection emit rightPressed(); } else { KMLineEdit::keyPressEvent( ev );