[LyX/master] Never mark references in inactive insets broken

Juergen Spitzmueller spitz at lyx.org
Sat Oct 3 06:27:52 UTC 2020


commit 2330b4ce9ca7d17bb86d08357fb279cfd57c5505
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sat Oct 3 08:54:06 2020 +0200

    Never mark references in inactive insets broken
    
    This is the sledgehammer (and the only) way to omit broken refs if the
    target is in an (or the same) inactive inset as well.
---
 src/insets/InsetRef.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp
index 92f0963..d30f2ef 100644
--- a/src/insets/InsetRef.cpp
+++ b/src/insets/InsetRef.cpp
@@ -514,7 +514,7 @@ void InsetRef::addToToc(DocIterator const & cpit, bool output_active,
 	active_ = output_active;
 	docstring const & label = getParam("reference");
 	if (buffer().insetLabel(label)) {
-		broken_ = !buffer().activeLabel(label);
+		broken_ = !buffer().activeLabel(label) && active_;
 		setBroken(broken_);
 		if (broken_ && output_active) {
 			shared_ptr<Toc> toc2 = backend.toc("brokenrefs");


More information about the lyx-cvs mailing list