mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Fix Tab and Ctrl-Tab keys handling and focus problems related to it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16381 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6c648c13a8
commit
9e4ac7fca9
@ -632,12 +632,11 @@ bool GuiView::event(QEvent * e)
|
||||
|
||||
if (e->type() == QEvent::ShortcutOverride) {
|
||||
QKeyEvent * ke = static_cast<QKeyEvent*>(e);
|
||||
if (ke->key() == Qt::Key_Tab) {
|
||||
if (ke->key() == Qt::Key_Tab || ke->key() == Qt::Key_Backtab) {
|
||||
boost::shared_ptr<QLyXKeySym> sym(new QLyXKeySym);
|
||||
sym->set(ke);
|
||||
work_area_->processKeySym(sym, key_modifier::none);
|
||||
e->accept();
|
||||
centralWidget()->setFocus();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -647,6 +646,13 @@ bool GuiView::event(QEvent * e)
|
||||
}
|
||||
|
||||
|
||||
bool GuiView::focusNextPrevChild(bool /*next*/)
|
||||
{
|
||||
static_cast<GuiWorkArea *>(work_area_)->setFocus();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void GuiView::show()
|
||||
{
|
||||
QMainWindow::setWindowTitle(qt_("LyX"));
|
||||
|
@ -126,6 +126,7 @@ private:
|
||||
|
||||
/// in order to catch Tab key press.
|
||||
bool event(QEvent * e);
|
||||
bool focusNextPrevChild(bool);
|
||||
|
||||
QTimer statusbar_timer_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user