commit 88034d3d8987a9601b0779bf0115b5105b16fd6e Author: Richard Kimberly Heck <rikih...@lyx.org> Date: Sat Dec 29 00:23:26 2018 -0500
Fix bug #11422. 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 | 11 +++++++---- status.23x | 6 +++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 6bd7776..07a067b 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -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()) { diff --git a/status.23x b/status.23x index 2490a67..d8214a6 100644 --- a/status.23x +++ b/status.23x @@ -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