mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
branch: GuiCitation: Do not allow to add entries by pressing Enter when the Add button is disabled.
see r40835. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40846 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f92c5848f6
commit
9a5c01acb8
@ -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
|
||||
}
|
||||
|
@ -65,7 +65,8 @@ What's new
|
||||
|
||||
* USER INTERFACE
|
||||
|
||||
-
|
||||
- Do not allow to add a citation in the citation dialog using the
|
||||
<Enter> key if the Add button is disabled.
|
||||
|
||||
|
||||
* DOCUMENTATION AND LOCALIZATION
|
||||
|
Loading…
Reference in New Issue
Block a user