]> git.lyx.org Git - features.git/commitdiff
Fix preview check box for include insets
authorScott Kostyshak <skostysh@lyx.org>
Wed, 11 Mar 2020 19:02:22 +0000 (15:02 -0400)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:53 +0000 (15:48 +0200)
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

index e22db995959860beb69ff563c9d07e0f667cd5ae..c4c0a5cf4661e1b795b04968227ee5ab084bb677 100644 (file)
@@ -627,6 +627,7 @@ docstring & InsetCommandParams::operator[](string const & name)
 void InsetCommandParams::clear()
 {
        params_.clear();
+       preview(false);
 }