[LyX/master] Do not throw away runparams settings of InsetText in InsetFoot::latex

Juergen Spitzmueller spitz at lyx.org
Mon Jul 17 10:06:55 UTC 2023


commit edaf28fdd6a64ce277a1c5f39d99a6568485887f
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Mon Jul 17 13:18:56 2023 +0200

    Do not throw away runparams settings of InsetText in InsetFoot::latex
    
    This amends 243b0ef90c09d5
---
 src/OutputParams.h       |    2 +-
 src/insets/InsetFoot.cpp |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/OutputParams.h b/src/OutputParams.h
index 36c972b..40a7a47 100644
--- a/src/OutputParams.h
+++ b/src/OutputParams.h
@@ -293,7 +293,7 @@ public:
 
 	/** Whether we are inside a footnote. 
 	 */
-	bool inFootnote = false;
+	mutable bool inFootnote = false;
 
 	/** Whether a btUnit (for multiple biblographies) is open.
 	 */
diff --git a/src/insets/InsetFoot.cpp b/src/insets/InsetFoot.cpp
index 1440310..a0f3435 100644
--- a/src/insets/InsetFoot.cpp
+++ b/src/insets/InsetFoot.cpp
@@ -111,11 +111,13 @@ docstring InsetFoot::toolTip(BufferView const & bv, int x, int y) const
 }
 
 
-void InsetFoot::latex(otexstream & os, OutputParams const & runparams_in) const
+void InsetFoot::latex(otexstream & os, OutputParams const & runparams) const
 {
-	OutputParams runparams(runparams_in);
+	// We need to maintain the runparams values set
+	// by InsetText::latex. hence we use no copy
 	runparams.inFootnote = true;
 	InsetText::latex(os, runparams);
+	runparams.inFootnote = false;
 }
 
 


More information about the lyx-cvs mailing list