From 696f745f6371fb5b4284ca1085e2866916535dc3 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 24 Apr 2008 18:19:40 +0000 Subject: [PATCH] Some comments. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24494 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiSelectionManager.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt4/GuiSelectionManager.cpp b/src/frontends/qt4/GuiSelectionManager.cpp index ab103c7653..55484b410e 100644 --- a/src/frontends/qt4/GuiSelectionManager.cpp +++ b/src/frontends/qt4/GuiSelectionManager.cpp @@ -320,13 +320,13 @@ bool GuiSelectionManager::eventFilter(QObject * obj, QEvent * event) return true; } } else if (obj == selectedLV) { - // Delete or backspace key will delete current item - // ...with control modifier will clear the list if (event->type() != QEvent::KeyPress) return QObject::eventFilter(obj, event); QKeyEvent * keyEvent = static_cast(event); int const keyPressed = keyEvent->key(); Qt::KeyboardModifiers const keyModifiers = keyEvent->modifiers(); + // Delete or backspace key will delete current item + // ...with control modifier will clear the list if (keyPressed == Qt::Key_Delete || keyPressed == Qt::Key_Backspace) { if (keyModifiers == Qt::NoModifier && deletePB->isEnabled()) { deletePB_clicked(); @@ -336,14 +336,18 @@ bool GuiSelectionManager::eventFilter(QObject * obj, QEvent * event) updateHook(); } else return QObject::eventFilter(obj, event); - } else if (keyPressed == Qt::Key_Up) { + } + // Ctrl-Up activates upPB + else if (keyPressed == Qt::Key_Up) { if (keyModifiers == Qt::ControlModifier) { if (upPB->isEnabled()) upPB_clicked(); event->accept(); return true; } - } else if (keyPressed == Qt::Key_Down) { + } + // Ctrl-Down activates downPB + else if (keyPressed == Qt::Key_Down) { if (keyModifiers == Qt::ControlModifier) { if (downPB->isEnabled()) downPB_clicked();