]> git.lyx.org Git - features.git/commitdiff
Fix bug #11422.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Sat, 29 Dec 2018 05:23:26 +0000 (00:23 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Sat, 29 Dec 2018 05:25:58 +0000 (00:25 -0500)
We need to load the master document before applying the params, since
otherwise the TOC reset (and other things) happen before the master
has been loaded (and set as parent).

(cherry picked from commit ac3693c04ffaa8e5bcb69884465c5508981e347e)

src/frontends/qt4/GuiDocument.cpp
status.23x

index 6bd7776bcf048e528a62a59c596590f9099d2e9b..07a067bcde63b367ee1dfa20634f300caf116a23 100644 (file)
@@ -4464,10 +4464,9 @@ void GuiDocument::dispatchParams()
        // This must come first so that a language change is correctly noticed
        setLanguage();
 
-       // Apply the BufferParams. Note that this will set the base class
-       // and then update the buffer's layout.
-       dispatch_bufferparams(*this, params(), LFUN_BUFFER_PARAMS_APPLY, &buffer());
-
+       // We need to load the master before we formally update the params,
+       // since otherwise we run updateBuffer, etc, before the child's master
+       // has been set.
        if (!params().master.empty()) {
                FileName const master_file = support::makeAbsPath(params().master,
                           support::onlyPath(buffer().absFileName()));
@@ -4489,6 +4488,10 @@ void GuiDocument::dispatchParams()
                }
        }
 
+       // Apply the BufferParams. Note that this will set the base class
+       // and then update the buffer's layout.
+       dispatch_bufferparams(*this, params(), LFUN_BUFFER_PARAMS_APPLY, &buffer());
+
        // Generate the colours requested by each new branch.
        BranchList & branchlist = params().branchlist();
        if (!branchlist.empty()) {
index 2490a673f7160c82cfd89b5a962ab04b921941c1..d8214a6fb67e83e5a08fefd9af11aee9ee895b47 100644 (file)
@@ -84,7 +84,11 @@ What's new
 
 - Fix some display problems in the Text Properties dialog (bug 11385).
 
-- Accept/reject changes inside selection only if there are changes (bug 10338).
+- Accept/reject changes inside selection only if there are changes (bug 
+  10338).
+
+- Fix missing TOC update (and related bugs) when setting default master (bug 
+  11422).
 
 
 * INTERNALS