]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiView.cpp
Introducing GuiMenubar::init() to avoid destructing the object in order to re-initial...
[lyx.git] / src / frontends / qt4 / GuiView.cpp
index f312b6c2de4badbd6397e84a296c6f5ab910b13d..66ed4feccf20a3a701f07db5625580d9d449bad2 100644 (file)
@@ -1165,6 +1165,10 @@ void GuiView::restartCursor()
         */
        if (d.current_work_area_)
                d.current_work_area_->startBlinkingCursor();
+
+       // Take this occasion to update the toobars and layout list.
+       updateLayoutList();
+       updateToolbars();
 }
 
 namespace {
@@ -1209,6 +1213,17 @@ bool isValidName(string const & name)
 } // namespace anon
 
 
+void GuiView::resetDialogs()
+{
+       // Make sure that no LFUN uses any LyXView.
+       theLyXFunc().setLyXView(0);
+       d.toolbars_->init();
+       d.menubar_->init();
+       if (d.layout_)
+               d.layout_->updateContents(true);
+}
+
+
 Dialog * GuiView::find_or_build(string const & name)
 {
        if (!isValidName(name))