git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32949 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Tommaso Cucinotta 2010-01-10 19:08:41 +00:00
parent b13ec49005
commit bf6a32bab4

View File

@ -585,11 +585,20 @@ TocModels & GuiView::tocModels()
void GuiView::setFocus() void GuiView::setFocus()
{ {
LYXERR(Debug::DEBUG, "GuiView::setFocus()" << this); LYXERR(Debug::DEBUG, "GuiView::setFocus()" << this);
QMainWindow::setFocus();
}
void GuiView::focusInEvent(QFocusEvent * e)
{
LYXERR(Debug::DEBUG, "GuiView::focusInEvent()" << this);
QMainWindow::focusInEvent(e);
// Make sure LyXFunc points to the correct view. // Make sure LyXFunc points to the correct view.
guiApp->setCurrentView(this); guiApp->setCurrentView(this);
QMainWindow::setFocus(); if (currentMainWorkArea())
if (d.current_work_area_) currentMainWorkArea()->setFocus();
d.current_work_area_->setFocus(); else if (currentWorkArea())
currentWorkArea()->setFocus();
else else
d.bg_widget_->setFocus(); d.bg_widget_->setFocus();
} }