]> git.lyx.org Git - features.git/commitdiff
Take advantage of new bufferViewChanged signal
authorGuillaume Munch <gm@lyx.org>
Sun, 9 Oct 2016 22:35:35 +0000 (00:35 +0200)
committerGuillaume Munch <gm@lyx.org>
Sun, 16 Oct 2016 22:16:59 +0000 (00:16 +0200)
src/frontends/qt4/GuiDocument.cpp
src/frontends/qt4/GuiDocument.h
src/frontends/qt4/GuiView.cpp

index c0e9605118ffe4ee1252c39baeb49935da9c8a1b..09d926029bf43944a598f52bf564cc2b633d4cad 100644 (file)
@@ -1456,6 +1456,13 @@ GuiDocument::GuiDocument(GuiView & lv)
 }
 
 
+void GuiDocument::on_bufferViewChanged()
+{
+       if (isVisibleView())
+               initialiseParams("");
+}
+
+
 void GuiDocument::saveDefaultClicked()
 {
        saveDocDefault();
index e0d42c9470743c3c133e33c65ce90070e5c0a95e..c2f944dcb8b9d9c2ae1fe1e38140c59cbc3045e3 100644 (file)
@@ -82,6 +82,9 @@ public:
        ///
        BufferParams const & params() const { return bp_; }
 
+public Q_SLOTS:
+       void on_bufferViewChanged();//override
+
 private Q_SLOTS:
        void updateNumbering();
        void change_adaptor();
index 6445f94e16f2a793013f9127a11b37ef0e044ff6..9c698cb757ab2d73b5c0601c38d242dd9c57f7ed 100644 (file)
@@ -1217,11 +1217,6 @@ void GuiView::on_currentWorkAreaChanged(GuiWorkArea * wa)
 void GuiView::on_bufferViewChanged()
 {
        structureChanged();
-
-       // The document settings needs to be reinitialised.
-       // TODO: no longer needed now there is bufferViewChanged?
-       updateDialog("document", "");
-
        // Buffer-dependent dialogs must be updated. This is done here because
        // some dialogs require buffer()->text.
        updateDialogs();