mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Implement resetArgs to InsetLayout (#8437)
This commit is contained in:
parent
7d1c8b5dc8
commit
2b40823d8e
@ -17321,7 +17321,81 @@ reference "des:FreeSpacing"
|
||||
\end_inset
|
||||
|
||||
) for information on `features'.
|
||||
\change_inserted -712698321 1354439699
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
||||
\change_inserted -712698321 1354439705
|
||||
\begin_inset Flex Code
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\change_inserted -712698321 1354439699
|
||||
ResetArgs
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
[
|
||||
\begin_inset Flex Code
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\change_inserted -712698321 1354439699
|
||||
|
||||
\emph on
|
||||
0
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
,
|
||||
\begin_inset Flex Code
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\change_inserted -712698321 1354439699
|
||||
1
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
] Resets the LaTeX arguments of this layout (as defined via the
|
||||
\begin_inset Flex Code
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\change_inserted -712698321 1354439699
|
||||
Argument
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
tag).
|
||||
This is useful if you have copied a style via
|
||||
\begin_inset Flex Code
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\change_inserted -712698321 1354439699
|
||||
CopyStyle
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
, but you do not want to inherit its (required and optional) arguments.
|
||||
|
||||
\change_deleted -712698321 1354439698
|
||||
|
||||
\change_unchanged
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
@ -117,9 +117,10 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
|
||||
IL_PREAMBLE,
|
||||
IL_REQUIRES,
|
||||
IL_RIGHTDELIM,
|
||||
IL_SPELLCHECK,
|
||||
IL_REFPREFIX,
|
||||
IL_RESETARGS,
|
||||
IL_RESETSFONT,
|
||||
IL_SPELLCHECK,
|
||||
IL_END
|
||||
};
|
||||
|
||||
@ -166,6 +167,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
|
||||
{ "preamble", IL_PREAMBLE },
|
||||
{ "refprefix", IL_REFPREFIX },
|
||||
{ "requires", IL_REQUIRES },
|
||||
{ "resetargs", IL_RESETARGS },
|
||||
{ "resetsfont", IL_RESETSFONT },
|
||||
{ "rightdelim", IL_RIGHTDELIM },
|
||||
{ "spellcheck", IL_SPELLCHECK }
|
||||
@ -331,6 +333,12 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
|
||||
labelfont_ = font_;
|
||||
break;
|
||||
}
|
||||
case IL_RESETARGS:
|
||||
bool reset;
|
||||
lex >> reset;
|
||||
if (reset)
|
||||
latexargs_.clear();
|
||||
break;
|
||||
case IL_ARGUMENT:
|
||||
readArgument(lex);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user