mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-23 16:52:02 +00:00
Make sure that the focus is correctly set before closing a window.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26690 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d8a6c1fc1e
commit
4ea899a7af
@ -968,7 +968,6 @@ void GuiApplication::createView(QString const & geometry_arg, bool autoShow,
|
||||
#endif
|
||||
}
|
||||
view->setFocus();
|
||||
setCurrentView(view);
|
||||
}
|
||||
|
||||
|
||||
|
@ -483,11 +483,11 @@ TocModels & GuiView::tocModels()
|
||||
void GuiView::setFocus()
|
||||
{
|
||||
// Make sure LyXFunc points to the correct view.
|
||||
guiApp->setCurrentView(this);
|
||||
theLyXFunc().setLyXView(this);
|
||||
QMainWindow::setFocus();
|
||||
if (d.current_work_area_)
|
||||
d.current_work_area_->setFocus();
|
||||
else
|
||||
QWidget::setFocus();
|
||||
}
|
||||
|
||||
|
||||
@ -517,8 +517,7 @@ void GuiView::closeEvent(QCloseEvent * close_event)
|
||||
|
||||
// it can happen that this event arrives without selecting the view,
|
||||
// e.g. when clicking the close button on a background window.
|
||||
theLyXFunc().setLyXView(this);
|
||||
guiApp->setCurrentView(this);
|
||||
setFocus();
|
||||
|
||||
while (Buffer * b = buffer()) {
|
||||
if (b->parent()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user