mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
No need to issue an error if the shortcut binding did not change.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33905 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
520709d2bb
commit
df1b413587
@ -2803,13 +2803,9 @@ void PrefShortcuts::shortcutOkPressed()
|
||||
FuncRequest oldBinding = system_bind_.getBinding(k);
|
||||
if (oldBinding.action == LFUN_UNKNOWN_ACTION)
|
||||
oldBinding = user_bind_.getBinding(k);
|
||||
if (oldBinding == func) {
|
||||
docstring const actionStr = makeCmdString(func);
|
||||
Alert::error(_("Failed to create shortcut"),
|
||||
bformat(_("Shortcut `%1$s' is already bound to:\n%2$s"),
|
||||
k.print(KeySequence::ForGui), actionStr));
|
||||
if (oldBinding == func)
|
||||
// nothing has changed
|
||||
return;
|
||||
}
|
||||
|
||||
// make sure this key isn't already bound---and, if so, not unbound
|
||||
FuncCode const unbind = user_unbind_.getBinding(k).action;
|
||||
|
Loading…
Reference in New Issue
Block a user