More whitespace.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22451 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-01-09 07:19:26 +00:00
parent b84e210719
commit 85ac3f0dc4

View File

@ -238,25 +238,25 @@ bool GuiSelectionManager::eventFilter(QObject * obj, QEvent * event)
Qt::KeyboardModifiers const keyModifiers = keyEvent->modifiers();
//Enter key without modifier will add current item.
//Ctrl-Enter will add it and close the dialog.
//This is designed to work both with the main enter key
//and the one on the numeric keypad.
if ((keyPressed == Qt::Key_Enter || keyPressed == Qt::Key_Return) &&
//We want one or both of Control and Keypad, and nothing else
//(KeypadModifier is what you get if you use the Enter key on the
//numeric keypad.)
(!keyModifiers ||
(keyModifiers == Qt::ControlModifier) ||
(keyModifiers == Qt::KeypadModifier) ||
(keyModifiers == (Qt::ControlModifier | Qt::KeypadModifier))
)
) {
if (addPB->isEnabled()) {
addPB_clicked();
okHook(); //signal
}
event->accept();
return true;
}
//This is designed to work both with the main enter key
//and the one on the numeric keypad.
if ((keyPressed == Qt::Key_Enter || keyPressed == Qt::Key_Return) &&
//We want one or both of Control and Keypad, and nothing else
//(KeypadModifier is what you get if you use the Enter key on the
//numeric keypad.)
(!keyModifiers ||
(keyModifiers == Qt::ControlModifier) ||
(keyModifiers == Qt::KeypadModifier) ||
(keyModifiers == (Qt::ControlModifier | Qt::KeypadModifier))
)
) {
if (addPB->isEnabled()) {
addPB_clicked();
okHook(); //signal
}
event->accept();
return true;
}
} else if (obj == selectedLV) {
//Delete or backspace key will delete current item
//...with control modifier will clear the list