mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
Allow Ctrl+Enter in GuiCitation even if the citation is already there
This commit is contained in:
parent
354897f6d9
commit
a0ce37147c
@ -390,15 +390,16 @@ bool GuiSelectionManager::eventFilter(QObject * obj, QEvent * event)
|
||||
// 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) {
|
||||
if (addPB->isEnabled()) {
|
||||
if (!keyModifiers) {
|
||||
if (!keyModifiers ||
|
||||
keyModifiers == Qt::ControlModifier ||
|
||||
keyModifiers == Qt::KeypadModifier ||
|
||||
keyModifiers == (Qt::ControlModifier
|
||||
| Qt::KeypadModifier)) {
|
||||
if (addPB->isEnabled()) {
|
||||
addPB_clicked();
|
||||
} else if (keyModifiers == Qt::ControlModifier ||
|
||||
keyModifiers == Qt::KeypadModifier ||
|
||||
keyModifiers == (Qt::ControlModifier | Qt::KeypadModifier)) {
|
||||
addPB_clicked();
|
||||
okHook(); //signal
|
||||
}
|
||||
if (keyModifiers)
|
||||
okHook(); //signal
|
||||
}
|
||||
event->accept();
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user