]> git.lyx.org Git - features.git/commitdiff
Allow to assign the shortcut to an action not only if this was an unknown action...
authorVincent van Ravesteijn <vfr@lyx.org>
Mon, 29 Mar 2010 09:15:27 +0000 (09:15 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Mon, 29 Mar 2010 09:15:27 +0000 (09:15 +0000)
This could be seen by adding a shortcut "Ctrl-R" to accent-acute. Then changing this to "Ctrl-R Ctrl-R". And then changing this back to "Ctrl-R". Now the oldBinding is NOACTION and a warning is issued that "Ctrl-R" was already bound.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33906 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiPrefs.cpp

index 5e3d9ff8beb6b80680a082043bb237dd774f9d84..f2a40b2641812bfc4542a69e6916a8069b41349e 100644 (file)
@@ -2810,7 +2810,7 @@ void PrefShortcuts::shortcutOkPressed()
        // make sure this key isn't already bound---and, if so, not unbound
        FuncCode const unbind = user_unbind_.getBinding(k).action;
        docstring const action_string = makeCmdString(oldBinding);
-       if (oldBinding.action != LFUN_UNKNOWN_ACTION && unbind == LFUN_UNKNOWN_ACTION
+       if (oldBinding.action > LFUN_NOACTION && unbind == LFUN_UNKNOWN_ACTION
                  && save_lfun_ != toqstr(action_string)) {
                // FIXME Perhaps we should offer to over-write the old shortcut?
                // If so, we'll need to remove it from our list, etc.