mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
GuiCitation: Do not allow to add entries by pressing Enter when the Add button is disabled.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40835 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1c66a43a91
commit
803e7a9cfa
@ -355,12 +355,12 @@ 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 (!keyModifiers)
|
||||
addPB_clicked();
|
||||
else if (keyModifiers == Qt::ControlModifier ||
|
||||
keyModifiers == Qt::KeypadModifier ||
|
||||
keyModifiers == (Qt::ControlModifier | Qt::KeypadModifier)) {
|
||||
if (addPB->isEnabled()) {
|
||||
if (addPB->isEnabled()) {
|
||||
if (!keyModifiers) {
|
||||
addPB_clicked();
|
||||
} else if (keyModifiers == Qt::ControlModifier ||
|
||||
keyModifiers == Qt::KeypadModifier ||
|
||||
keyModifiers == (Qt::ControlModifier | Qt::KeypadModifier)) {
|
||||
addPB_clicked();
|
||||
okHook(); //signal
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user