From: Richard Kimberly Heck Date: Sat, 29 Dec 2018 05:23:26 +0000 (-0500) Subject: Fix bug #11422. X-Git-Tag: 2.3.3~92 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=88034d3d8987a9601b0779bf0115b5105b16fd6e;p=features.git 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) --- diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 6bd7776bcf..07a067bcde 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 2490a673f7..d8214a6fb6 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