diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 978228f70a..6b0a78adaa 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -1026,6 +1026,7 @@ void GuiApplication::resetGui() QHash::iterator it; for (it = d->views_.begin(); it != d->views_.end(); ++it) { GuiView * gv = *it; + setCurrentView(gv); gv->setLayoutDirection(layoutDirection()); gv->resetDialogs(); } diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index b1e06fc00d..c916fb8bf6 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -781,7 +781,8 @@ void MenuDefinition::expandDocuments() QString label = toqstr(b->fileName().displayName(20)); if (!b->isClean()) label += "*"; - bool const shown = guiApp->currentView()->workArea(*b); + bool const shown = guiApp->currentView() + ? guiApp->currentView()->workArea(*b) : false; int ii = shown ? vis : invis; if (ii < 10) label = QString::number(ii) + ". " + label + '|' + QString::number(ii);