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.
This commit is contained in:
Scott Kostyshak 2020-03-11 15:02:22 -04:00
parent f1694db496
commit 36208d488e

View File

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