[LyX/master] Fix preview check box for include insets

Scott Kostyshak skostysh at lyx.org
Fri Mar 13 13:59:08 UTC 2020


commit 36208d488e98d5f13571b1d4a2c7d3c2caeef310
Author: Scott Kostyshak <skostysh at lyx.org>
Date:   Wed Mar 11 15:02:22 2020 -0400

    Fix preview check box for include insets
    
    GuiInclude::initialiseParams() calls InsetCommand::string2params()
    which calls InsetCommandParams::clear(), however this last function
    did not reset the special "preview_" parameter. Now this parameter
    is reset to false as part of clear().
    
    The ParamData class documents (see InsetCommandParams.h) the
    following:
    
      // No parameter may be named "preview", because that is a required
      // flag for all commands.
    
    Thus, we must handle preview_ separately from the other parameters.
    
    This commit fixes #11779.
---
 src/insets/InsetCommandParams.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/insets/InsetCommandParams.cpp b/src/insets/InsetCommandParams.cpp
index e22db99..c4c0a5c 100644
--- a/src/insets/InsetCommandParams.cpp
+++ b/src/insets/InsetCommandParams.cpp
@@ -627,6 +627,7 @@ docstring & InsetCommandParams::operator[](string const & name)
 void InsetCommandParams::clear()
 {
 	params_.clear();
+	preview(false);
 }
 
 


More information about the lyx-cvs mailing list