From: Vincent van Ravesteijn Date: Sat, 3 Mar 2012 15:52:21 +0000 (+0000) Subject: branch: GuiCitation: Do not allow to add entries by pressing Enter when the Add butto... X-Git-Tag: 2.0.4~201 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9a5c01acb846c31ffa4941a6fd415b3b8a78e04b;p=features.git 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 --- diff --git a/src/frontends/qt4/GuiSelectionManager.cpp b/src/frontends/qt4/GuiSelectionManager.cpp index 825115cb3a..d3d2b01f41 100644 --- a/src/frontends/qt4/GuiSelectionManager.cpp +++ b/src/frontends/qt4/GuiSelectionManager.cpp @@ -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 } diff --git a/status.20x b/status.20x index 03709a8b3c..57dd19f84a 100644 --- a/status.20x +++ b/status.20x @@ -65,7 +65,8 @@ What's new * USER INTERFACE -- +- Do not allow to add a citation in the citation dialog using the + key if the Add button is disabled. * DOCUMENTATION AND LOCALIZATION