]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiDocument.cpp
Fix bug 4410 (http://bugzilla.lyx.org/show_bug.cgi?id=4410).
[lyx.git] / src / frontends / qt4 / GuiDocument.cpp
index a1617053b2306873701b15ad9c08a341bf909b03..108ba779fa3165bcb4174de28f8e75cfef8cfe45 100644 (file)
@@ -13,6 +13,8 @@
 
 #include "GuiDocument.h"
 
+#include "GuiView.h"
+
 #include "BranchList.h"
 #include "buffer_funcs.h"
 #include "Buffer.h"
@@ -23,7 +25,7 @@
 #include "Encoding.h"
 #include "FloatPlacement.h"
 #include "FuncRequest.h"
-#include "gettext.h"
+#include "support/gettext.h"
 #include "GuiBranches.h"
 #include "Language.h"
 #include "LaTeXFeatures.h"
@@ -42,6 +44,8 @@
 
 #include "insets/InsetListingsParams.h"
 
+#include "support/FileName.h"
+#include "support/filetools.h"
 #include "support/lstrings.h"
 
 #include <boost/bind.hpp>
@@ -212,7 +216,7 @@ void PreambleModule::closeEvent(QCloseEvent * e)
 
 
 
-GuiDocument::GuiDocument(LyXView & lv)
+GuiDocument::GuiDocument(GuiView & lv)
        : GuiDialog(lv, "document")
 {
        setupUi(this);
@@ -1291,6 +1295,13 @@ void GuiDocument::apply(BufferParams & params)
 
        // Embedded files
        // FIXME
+
+       // GuiDocument is special because some change in there might affect other
+       // dialogs. It is then better to make sure that all dialogs are in sync
+       // with current document settings.
+       lyxview().updateBufferDependent(true);
+       lyxview().updateLayoutList();
+       lyxview().updateToolbars();
 }
 
 
@@ -1841,7 +1852,7 @@ void GuiDocument::loadModuleNames ()
 }
 
 
-Dialog * createGuiDocument(LyXView & lv) { return new GuiDocument(lv); }
+Dialog * createGuiDocument(GuiView & lv) { return new GuiDocument(lv); }
 
 
 } // namespace frontend