]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiApplication.cpp
Introducing Application::resetGui() that will reset all dialogs in all lyx windows...
[lyx.git] / src / frontends / qt4 / GuiApplication.cpp
index 0fad5bc9c1740f6816d60cf6b31bd1a568cf9b5a..e646929f76c60e5243754bb79e65be6303b9cad3 100644 (file)
@@ -213,6 +213,14 @@ GuiApplication::~GuiApplication()
 }
 
 
+void GuiApplication::resetGui()
+{
+       map<int, GuiView *>::iterator it;
+       for (it = views_.begin(); it != views_.end(); ++it)
+               it->second->resetDialogs();
+}
+
+
 static void updateIds(map<int, GuiView *> const & stdmap, vector<int> & ids)
 {
        ids.clear();
@@ -234,7 +242,6 @@ LyXView & GuiApplication::createView(string const & geometry_arg)
        GuiView * view  = views_[id];
        theLyXFunc().setLyXView(view);
 
-       view->init();
        view->show();
        if (!geometry_arg.empty()) {
 #ifdef Q_WS_WIN
@@ -496,7 +503,7 @@ bool GuiApplication::closeAllViews()
 }
 
 
-LyXView & GuiApplication::view(int id) const
+GuiView & GuiApplication::view(int id) const
 {
        BOOST_ASSERT(views_.find(id) != views_.end());
        return *views_.find(id)->second;