mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 09:15:50 +00:00
backport r30389 (bug #6043)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30898 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5ba684315e
commit
0f655bc3eb
@ -141,10 +141,11 @@ void ShortcutWidget::appendToSequence(QKeyEvent * e)
|
|||||||
{
|
{
|
||||||
KeySymbol sym;
|
KeySymbol sym;
|
||||||
setKeySymbol(&sym, e);
|
setKeySymbol(&sym, e);
|
||||||
|
|
||||||
KeyModifier mod = lyx::q_key_state(e->modifiers());
|
|
||||||
|
|
||||||
keysequence_.addkey(sym, mod, lyx::NoModifier);
|
if (sym.isOK()) {
|
||||||
|
KeyModifier mod = lyx::q_key_state(e->modifiers());
|
||||||
|
keysequence_.addkey(sym, mod, lyx::NoModifier);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -638,7 +638,7 @@ void KeySymbol::init(string const & symbolname)
|
|||||||
|
|
||||||
bool KeySymbol::isOK() const
|
bool KeySymbol::isOK() const
|
||||||
{
|
{
|
||||||
bool const ok = !(text_.empty() && key_ == Qt::Key_unknown);
|
bool const ok = !(text_.empty() && qkey_to_string(key_).empty());
|
||||||
LYXERR(Debug::KEY, "isOK is " << ok);
|
LYXERR(Debug::KEY, "isOK is " << ok);
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
@ -854,8 +854,12 @@ void GuiWorkArea::keyPressEvent(QKeyEvent * ev)
|
|||||||
|
|
||||||
KeySymbol sym;
|
KeySymbol sym;
|
||||||
setKeySymbol(&sym, ev);
|
setKeySymbol(&sym, ev);
|
||||||
processKeySym(sym, q_key_state(ev->modifiers()));
|
if (sym.isOK()) {
|
||||||
ev->accept();
|
processKeySym(sym, q_key_state(ev->modifiers()));
|
||||||
|
ev->accept();
|
||||||
|
} else {
|
||||||
|
ev->ignore();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -296,6 +296,8 @@ What's new
|
|||||||
- Re-allow the insertion of glue lengths in the VSpace dialog and the
|
- Re-allow the insertion of glue lengths in the VSpace dialog and the
|
||||||
VSkip widget of the Document dialog (bug 6097).
|
VSkip widget of the Document dialog (bug 6097).
|
||||||
|
|
||||||
|
- Fix bug where multimedia keys were intercepted by LyX (bug 6043).
|
||||||
|
|
||||||
|
|
||||||
* DOCUMENTATION AND LOCALIZATION
|
* DOCUMENTATION AND LOCALIZATION
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user