#5970 more exact modifier check for Tab keys filter

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35571 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stephan Witt 2010-10-08 05:23:59 +00:00
parent 0dc22fb82f
commit d87cdfa5e1

View File

@ -654,11 +654,14 @@ bool GuiWorkArea::event(QEvent * e)
// which are otherwise reserved to focus switching between controls
// within a dialog.
QKeyEvent * ke = static_cast<QKeyEvent*>(e);
if ((ke->key() != Qt::Key_Tab && ke->key() != Qt::Key_Backtab)
|| ke->modifiers() & Qt::ControlModifier)
return QAbstractScrollArea::event(e);
keyPressEvent(ke);
return true;
if ((ke->key() == Qt::Key_Tab && ke->modifiers() == Qt::NoModifier)
|| (ke->key() == Qt::Key_Backtab && (
ke->modifiers() == Qt::ShiftModifier
|| ke->modifiers() == Qt::NoModifier))) {
keyPressEvent(ke);
return true;
}
return QAbstractScrollArea::event(e);
}
default: