X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBuffer.cpp;h=8ca74103a232a48705cd0814cdb14ab1dba8a768;hb=c5cab5a8f7e1f0f3996c1655c45a0fb88576dd5f;hp=e05c4d07bb96e2373dbe1d50f41c64d49d1a93d1;hpb=8bd65041f2e22bf4c37219c7008a7e4e2bda2799;p=lyx.git diff --git a/src/Buffer.cpp b/src/Buffer.cpp index e05c4d07bb..8ca74103a2 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1041,6 +1041,10 @@ bool Buffer::readDocument(Lexer & lex) << absFileName() << ") does not include " "this document. Ignoring the master assignment."); + // If the master has just been created, un-hide it (#11162) + if (!master->fileName().exists()) + lyx::dispatch(FuncRequest(LFUN_BUFFER_SWITCH, + master->absFileName())); } } } @@ -2416,7 +2420,8 @@ BiblioInfo const & Buffer::bibInfo() const } -void Buffer::registerBibfiles(FileNamePairList const & bf) const { +void Buffer::registerBibfiles(FileNamePairList const & bf) const +{ // We register the bib files in the master buffer, // if there is one, but also in every single buffer, // in case a child is compiled alone. @@ -2464,17 +2469,17 @@ void Buffer::checkIfBibInfoCacheIsValid() const } -void Buffer::reloadBibInfoCache() const +void Buffer::reloadBibInfoCache(bool const force) const { // use the master's cache Buffer const * const tmp = masterBuffer(); if (tmp != this) { - tmp->reloadBibInfoCache(); + tmp->reloadBibInfoCache(force); return; } checkIfBibInfoCacheIsValid(); - if (d->bibinfo_cache_valid_) + if (d->bibinfo_cache_valid_ && !force) return; d->bibinfo_.clear();