Author: vfr
Date: Sat Mar  3 16:52:21 2012
New Revision: 40846
URL: http://www.lyx.org/trac/changeset/40846

Log:
branch: GuiCitation: Do not allow to add entries by pressing Enter when the Add 
button is disabled.

see r40835.

Modified:
   lyx-devel/branches/BRANCH_2_0_X/src/frontends/qt4/GuiSelectionManager.cpp
   lyx-devel/branches/BRANCH_2_0_X/status.20x

Modified: 
lyx-devel/branches/BRANCH_2_0_X/src/frontends/qt4/GuiSelectionManager.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/src/frontends/qt4/GuiSelectionManager.cpp   
Sat Mar  3 16:44:01 2012        (r40845)
+++ lyx-devel/branches/BRANCH_2_0_X/src/frontends/qt4/GuiSelectionManager.cpp   
Sat Mar  3 16:52:21 2012        (r40846)
@@ -355,12 +355,12 @@
                        // 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
                                        }

Modified: lyx-devel/branches/BRANCH_2_0_X/status.20x
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/status.20x  Sat Mar  3 16:44:01 2012        
(r40845)
+++ lyx-devel/branches/BRANCH_2_0_X/status.20x  Sat Mar  3 16:52:21 2012        
(r40846)
@@ -65,7 +65,8 @@
 
 * 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

Reply via email to